query-049ba361924674828b392062aac295b7

rq turtle/ttl

Propertieslocated in the administrative territorial entity (P131)contains the administrative territorial entity (P150)instance of (P31)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel WHERE {
  ?adminTree (wdt:P131)* wd:Q1055 .
  ?adminTree (wdt:P150)* ?territory .
  ?statement pq:P131 ?territory .
  ?item ?p ?statement .
  ?item wdt:P31 wd:Q13406463
  SERVICE wikibase:label { bd:serviceParam wikibase:language "de" }
} ORDER BY ( ?itemLabel )

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?adminTree") v5("?item"):::projected v1("?itemLabel"):::projected v6("?p") v4("?statement") v3("?territory") c10(["de"]):::literal c8(["bd:serviceParam"]):::iri c2(["wd:Q1055"]):::iri c6(["wd:Q13406463"]):::iri v2 --"wdt:P131"--> c2 v2 --"wdt:P150"--> v3 v4 --"pq:P131"--> v3 v5 -->v6--> v4 v5 --"wdt:P31"--> c6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end