Template talk:SPARQL/doc

From Wikibase Personal data
< Template talk:SPARQL
Revision as of 01:20, 10 May 2019 by 192.168.0.1 (talk) (Created page with "{{SPARQL|query=SELECT DISTINCT ?person ?name ?language ?death (URI(CONCAT("https://www.gutenberg.org/ebooks/author/", ?gutenberg)) AS ?gberglink) WHERE { ?person wdt:P1938 ?gu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
PREFIX pdio: <https://wiki.personaldata.io/entity/>
PREFIX pdiot: <https://wiki.personaldata.io/prop/direct/>
PREFIX pdiop: <https://wiki.personaldata.io/prop/>
PREFIX pdiops: <https://wiki.personaldata.io/prop/statement/>
PREFIX pdiopq: <https://wiki.personaldata.io/prop/qualifier/>
SELECT DISTINCT ?person ?name ?language ?death (URI(CONCAT("https://www.gutenberg.org/ebooks/author/", ?gutenberg)) AS ?gberglink) WHERE { ?person wdt:P1938 ?gutenberg. ?person wdt:P570 ?death. # Dead people only MINUS { ?enws schema:about ?person. ?enws schema:isPartOf <https://en.wikisource.org/> } OPTIONAL {?person wdt:P1412 ?lang}. FILTER (!BOUND(?lang) || ?lang = wd:Q1860) # Language: English or absent BIND(IF(BOUND(?lang),"English","Not specified") AS ?language ) ?person rdfs:label ?name. FILTER((LANG(?name)) = "en") } ORDER BY ?death

Try it (embedded)