query-d1e2318087f8a60739b489f7465c0e75

rq turtle/ttl

Living

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"]}
SELECT ?coord ?birthyear ?birthplace ?name ?person WHERE {
   {?person wdt:P106 wd:Q188094 } UNION {?person wdt:P101 wd:Q8134} MINUS {?person wdt:P106 wd:Q188094; wdt:P101 wd:Q8134}
   ?person wdt:P19 ?place .
   ?place wdt:P625 ?coord .
   OPTIONAL { ?person wdt:P569 ?dob }.
   MINUS { ?person wdt:P570 ?dod }.
   BIND(YEAR(?dob) as ?birthyear).
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". ?person rdfs:label ?name. ?place rdfs:label ?birthplace}
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v8("?birthplace"):::projected v6("?birthyear"):::projected v3("?coord"):::projected v4("?dob") v5("?dod") v7("?name"):::projected v1("?person"):::projected v2("?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; v1 --"wdt:P101"--> c4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P106"--> c2 end union0r <== or ==> union0l end subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P106"--> c2 v1 --"wdt:P101"--> c4 end v1 --"wdt:P19"--> v2 v2 --"wdt:P625"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P569".-> v4 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P570"--> v5 end bind2[/"year-from-dateTime(?dob)"/] v4 --o bind2 bind2 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 v1 --"rdfs:label"--> v7 v2 --"rdfs:label"--> v8 end