query-72bc61bdaf3c8abef3c713b8dce1d080
TODO
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
SELECT distinct ?item ?itemLabel ?coord WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
{ ?item wdt:P31/wdt:P279* wd:Q67147037 . }
union
{ ?item wdt:P361/wdt:P31/wdt:P279* wd:Q67147037 . }
MINUS { ?item wdt:P576 _:b2. }
MINUS { ?item wdt:P361 wd:Q3089219. }
OPTIONAL { ?item wdt:P625 ?coord. }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?coord"):::projected
v1("?item"):::projected
a4((" "))
a1((" "))
a2((" "))
a3((" "))
c2(["bd:serviceParam"]):::iri
c7(["wd:Q67147037"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c10(["wd:Q3089219"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P361"--> a2
a2 --"wdt:P31"--> a3
a3 --"wdt:P279"--> c7
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c7
end
union0r <== or ==> union0l
end
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P576"--> a4
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v1 --"wdt:P361"--> c10
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v2
end