query-7c8c0f1cde9f326b1449785cfd89e15d

rq turtle/ttl

TODO

Use at

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 ?start_date ?end_date WHERE {
  ?item p:P31/p:P279* ?statement .
  ?statement ps:P31 wd:Q42744322.
  ?statement wikibase:rank ?urban_municipality_rank .
  optional {?statement pq:P580 ?start_date . }
  optional {?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; v5("?end_date"):::projected v1("?item"):::projected v4("?start_date"):::projected v2("?statement") v3("?urban_municipality_rank") a1((" ")) c9(["bd:serviceParam"]):::iri c4(["wd:Q42744322"]):::iri c11(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"p:P31"--> a1 a1 --"p:P279"--> v2 v2 --"p:statement/P31"--> c4 v2 --"wikibase:rank"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P580".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P582".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end