query-c9f5746c9c9435f9222341f9649c99a3
Propertiesinstance of (P31)located in the administrative territorial entity (P131)official website (P856)coordinate location (P625)
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 DISTINCT ?instanceOfLabel ?item ?itemLabel ?lgaLabel ?website ?coords
WHERE {
{ ?item wdt:P31 wd:Q1595639 }
UNION { ?item wdt:P31 wd:Q27032320 }
UNION { ?item wdt:P31 wd:Q13723070 } .
?item wdt:P31 ?instanceOf .
?item wdt:P131* wd:Q3206 .
?item wdt:P131 ?lga .
OPTIONAL{ ?item wdt:P856 ?website } .
OPTIONAL{ ?item wdt:P625 ?coords } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?coords"):::projected
v3("?instanceOf")
v2("?item"):::projected
v1("?itemLabel"):::projected
v4("?lga")
v5("?website"):::projected
c2(["wd:Q1595639"]):::iri
c6(["wd:Q3206"]):::iri
c10(["bd:serviceParam"]):::iri
c4(["wd:Q13723070"]):::iri
c12(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q27032320"]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> c4
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> c3
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> c2
end
union0r <== or ==> union0l
end
v2 --"wdt:P31"--> v3
v2 --"wdt:P131"--> c6
v2 --"wdt:P131"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P856".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P625".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end