User:Jheald/sparql/Bible characters
< User:Jheald | sparql
# Query to list bible characters and the books they appear in
# From page [[User:Jheald/sparql/Bible_characters]]
SELECT DISTINCT ?character ?characterLabel ?book ?bookLabel
WHERE {
?character wdt:P31/wdt:P279* wd:Q12405827 . # biblical character
?character wdt:P1441 ?book . # present in work
?book wdt:P361* wd:Q1845 . # part of the bible
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
} ORDER BY ?characterLabel
Run this
When transcluded from a wiki page, the query above will be turned into a URL suitable to include in a link