query-64d67e32a887b462c407b676cb4a41ed

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?dobyear ?dodyear ?sl ?P528_statement ?propertyLabel ?P528_qualifier WHERE {

 ?item wdt:P69/wdt:P361? wd:Q153978; wdt:P31 wd:Q5; wikibase:sitelinks ?sl .
 OPTIONAL {
   ?item wdt:P569 ?dob .
   BIND(YEAR(?dob) AS ?dobyear) .
 }
 OPTIONAL {
   ?item wdt:P570 ?dod .
   BIND(YEAR(?dod) AS ?dodyear) .
 }
 FILTER(BOUND(?dobyear) && ?dobyear <= 1900) .
 {?item wdt:P528 ?P528_statement.}
  UNION
 {?statement pq:P528 ?P528_qualifier.
 ?item ?predicate ?statement.
 ?property wikibase:claim ?predicate .}
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de,en". }
} order by ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v10("?P528_qualifier"):::projected v8("?P528_statement"):::projected v5("?dob") v6("?dobyear"):::projected v6("?dod") v7("?dodyear"):::projected v3("?item"):::projected v1("?itemLabel"):::projected v11("?predicate") v12("?property") v4("?sl"):::projected v9("?statement") a1((" ")) c3(["wd:Q153978"]):::iri c14(["bd:serviceParam"]):::iri c6(["wd:Q5"]):::iri c16(["#91;AUTO_LANGUAGE#93;,de,en"]):::literal f0[["bound(?dobyear)?dobyear <= '1900^^xsd:integer'"]] f0 --> v6 v3 --"wdt:P69"--> a1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; a1 --"wdt:P361"--> c3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; end union0r <== or ==> union0l end v3 --"wdt:P31"--> c6 v3 --"wikibase:sitelinks"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P569".-> v5 bind1[/"year-from-dateTime(?dob)"/] v5 --o bind1 bind1 --as--o v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P570".-> v6 bind2[/"year-from-dateTime(?dod)"/] v6 --o bind2 bind2 --as--o v7 end subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v9 --"pq:P528"--> v10 v3 -->v11--> v9 v12 --"wikibase:claim"--> v11 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P528"--> v8 end union1r <== or ==> union1l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 end