query-49ab861f61642c681c120b2ecabe065e
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel ?municipality_rankLabel ?urban_municipality_rankLabel ?end_date WHERE {
?item p:P31 ?statement2 .
?statement2 ps:P31 wd:Q262166 .
?statement2 wikibase:rank ?municipality_rank .
?item p:P31/p:P279* ?statement .
?statement ps:P31 wd:Q42744322.
?statement wikibase:rank ?urban_municipality_rank .
?statement pq:P582 ?end_date.
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;
v6("?end_date"):::projected
v1("?item"):::projected
v3("?municipality_rank")
v4("?statement")
v2("?statement2")
v5("?urban_municipality_rank")
a1((" "))
c9(["bd:serviceParam"]):::iri
c6(["wd:Q42744322"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c3(["wd:Q262166"]):::iri
v1 --"p:P31"--> v2
v2 --"p:statement/P31"--> c3
v2 --"wikibase:rank"--> v3
v1 --"p:P31"--> a1
a1 --"p:P279"--> v4
v4 --"p:statement/P31"--> c6
v4 --"wikibase:rank"--> v5
v4 --"p:qualifier/P582"--> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end