query-bb28aa0610d464eb6806e2076793f33b

rq turtle/ttl

Dead

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map{"hide": ["?coord", "?layer"]}
SELECT DISTINCT ?person ?name ?birthplace ?birthyear ?coord ?layer WHERE {
   {?person wdt:P106 wd:Q188094} UNION {?person wdt:P101 wd:Q8134} MINUS {?person wdt:P106 wd:Q188094; wdt:P101 wd:Q8134}
   ?person wdt:P570 ?dod;
     wdt:P19 ?place .
   ?place wdt:P625 ?coord
   OPTIONAL { ?person wdt:P569 ?dob }
   BIND(YEAR(?dob) as ?birthyear)
  BIND(IF( (?birthyear < 1700), "Pre-1700", IF((?birthyear < 1751), "1700-1750", IF((?birthyear < 1801), "1751-1800", IF((?birthyear < 1851), "1801-1850", IF((?birthyear < 1901), "1851-1900", IF((?birthyear < 1951), "1901-1950", "Post-1950") ) ) ) )) AS ?layer )
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en".?person rdfs:label ?name. ?place rdfs:label ?birthplace }
} ORDER BY ?birthyear

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?birthplace"):::projected v7("?birthyear"):::projected v5("?coord"):::projected v6("?dob") v3("?dod") v7("?layer"):::projected v8("?name"):::projected v2("?person"):::projected v4("?place") c12(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal c4(["wd:Q8134"]):::iri c10(["bd:serviceParam"]):::iri c2(["wd:Q188094"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P101"--> c4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P106"--> c2 end union0r <== or ==> union0l end subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v2 --"wdt:P106"--> c2 v2 --"wdt:P101"--> c4 end v2 --"wdt:P570"--> v3 v2 --"wdt:P19"--> v4 v4 --"wdt:P625"--> v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P569".-> v6 end bind1[/"year-from-dateTime(?dob)"/] v6 --o bind1 bind1 --as--o v7 bind2[/"if(?birthyear < '1700^^xsd:integer','Pre-1700',if(?birthyear < '1751^^xsd:integer','1700-1750',if(?birthyear < '1801^^xsd:integer','1751-1800',if(?birthyear < '1851^^xsd:integer','1801-1850',if(?birthyear < '1901^^xsd:integer','1851-1900',if(?birthyear < '1951^^xsd:integer','1901-1950','Post-1950'))))))"/] v7 --o bind2 bind2 --as--o v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 v2 --"rdfs:label"--> v8 v4 --"rdfs:label"--> v9 end