query-fea4e0484d1b0d9a8f5ca37eb6ab0087

rq turtle/ttl

SELECT DISTINCT concat(?item, 'P6216|Q19652|P1001|Q60332278|P459|Q29940705| / Based on ", ?author, "s date of death:", year(?dod), " /")

SELECT DISTINCT ?item (concat(?authorLabel, str(YEAR(?dod), " */")) as ?comment)

SELECT DISTINCT ?item ?authorLabel (YEAR(?dod) as ?year) WHERE { ?item wdt:P31 wd:Q3305213 . FILTER NOT EXISTS { ?item wdt:P6216 [] } . ?item wdt:P170 ?author . ?author wdt:P570 ?dod . FILTER(YEAR(?dod) < 1850) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } Limit 20000

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#SELECT DISTINCT  concat(?item, 'P6216|Q19652|P1001|Q60332278|P459|Q29940705| /* Based on ", ?author, "s date of death:", year(?dod), " */")
#SELECT DISTINCT  ?item  (concat(?authorLabel, str(YEAR(?dod), " */")) as ?comment)
SELECT DISTINCT  ?item  ?authorLabel (YEAR(?dod) as ?year)
WHERE {
  ?item wdt:P31 wd:Q3305213 .
  FILTER NOT EXISTS { ?item wdt:P6216 [] } .
  ?item wdt:P170 ?author .
  ?author wdt:P570 ?dod .
  FILTER(YEAR(?dod) < 1850)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Limit 20000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?author") v1("?dod"):::projected v2("?item"):::projected v4("?year") a1((" ")) c4(["wd:Q3305213"]):::iri c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["year-from-dateTime(?dod) < '1850^^xsd:integer'"]] f0 --> v1 f1[["not "]] subgraph f1e0["Exists Clause"] e0v1 --"wdt:P6216"--> e0a1 e0v1("?item"):::projected e0a1((" ")):::projected end f1--EXISTS--> f1e0 f1 --> v2 f1 --> c2 f1 --> a1 v2 --"wdt:P6216"--> a1 v2 --"wdt:P31"--> c4 v2 --"wdt:P170"--> v3 v3 --"wdt:P570"--> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind2[/"year-from-dateTime(?dod)"/] v1 --o bind2 bind2 --as--o v4