Isaiah in the Book of Mormon
Each line joins a passage of the Book of Mormon, along the top in reading order, to the chapter of Isaiah it quotes, along the bottom.
The query
with bom as (
select min(w.sequence) as first, max(w.sequence) as last
from word w
join verse v on v.id = w.verse_id
join chapter c on c.id = v.chapter_id
join edition e on e.id = c.edition_id
where e.name = 'Book of Mormon (2013)'
)
select fb.name as book, fb.name || ' ' || fc.number as quoting,
'Isaiah ' || tc.number || ':' || tv.number as quoted,
1.0 * (fw.sequence - bom.first) / (bom.last - bom.first) as quoting_at,
tc.number + 1.0 * tv.number / (select max(number) from verse where chapter_id = tc.id) as quoted_at
from passage_link l
join link_kind k on k.id = l.link_kind_id
join word fw on fw.id = l.from_first_word_id
join verse fv on fv.id = fw.verse_id
join chapter fc on fc.id = fv.chapter_id
join book fb on fb.id = fc.book_id
join edition fe on fe.id = fc.edition_id
join word tw on tw.id = l.to_first_word_id
join verse tv on tv.id = tw.verse_id
join chapter tc on tc.id = tv.chapter_id
join book tb on tb.id = tc.book_id
cross join bom
where k.name = 'Quotes' and fe.name = 'Book of Mormon (2013)' and tb.name = 'Isaiah'
order by fw.sequence
Run it on the API to see the rows this chart is drawn from.