query-2d9e05d925a6342988a7506306ae2de5
Map by place of death
Use at
- https://query.wikidata.org/sparql
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#>
#defaultView:Map{"hide":["?coor"]}
SELECT ?item ?itemLabel ?itemDescription ?img ?pod ?podLabel ?coor ?age
WHERE
{
?item wdt:P509 wd:Q84263196 ; wdt:P31 wd:Q5 .
?item wdt:P20 ?pod . ?pod wdt:P625 ?coor .
OPTIONAL { ?item wdt:P18 ?img }
OPTIONAL { ?item wdt:P569 ?dob ; wdt:P570 ?dod . BIND(YEAR(?dod)-YEAR(?dob) as ?age) }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?age"):::projected
v3("?coor"):::projected
v5("?dob")
v6("?dod")
v4("?img"):::projected
v1("?item"):::projected
v2("?pod"):::projected
c2(["wd:Q84263196"]):::iri
c11(["bd:serviceParam"]):::iri
c4(["wd:Q5"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v1 --"wdt:P509"--> c2
v1 --"wdt:P31"--> c4
v1 --"wdt:P20"--> v2
v2 --"wdt:P625"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v4
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P569".-> v5
v1 --"wdt:P570"--> v6
bind0[/"year-from-dateTime(?dod) - year-from-dateTime(?dob)"/]
v6 --o bind0
v5 --o bind0
bind0 --as--o v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end