query-f2d22d29e0b42f0e69dd711ef172c6f6
Propertiesinstance of (P31)subclass of (P279)
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#>
SELECT ?entity ?entityLabel ?geoshape
WHERE {
{
?entity wdt:P31/wdt:P279* wd:Q16511251 . # Instance of or subclass Municipality of Greenland
}
UNION
{
?entity wdt:P31/wdt:P279* wd:Q52994899 . # Instance of unincorporated area of Greenland
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?entityLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?entity"):::projected
v1("?entityLabel"):::projected
a1((" "))
a2((" "))
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q16511251"]):::iri
c4(["wd:Q52994899"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end