query-71f2b31143ba4775d36c437c5b82894d

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?rural_district_of_Germany ?rural_district_of_GermanyLabel ?located_in_the_administrative_territorial_entity ?located_in_the_administrative_territorial_entityLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  { ?rural_district_of_Germany p:P31/ps:P31/wdt:P279* wd:Q22865 .}
  UNION
  { ?rural_district_of_Germany p:P31/ps:P31/wdt:P279* wd:Q106658 . }  
  ?rural_district_of_Germany wdt:P131* ?located_in_the_administrative_territorial_entity.
  ?located_in_the_administrative_territorial_entity wdt:P31 wd:Q1221156 .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?located_in_the_administrative_territorial_entity"):::projected v1("?rural_district_of_Germany"):::projected a1((" ")) a2((" ")) a3((" ")) a4((" ")) c9(["wd:Q106658"]):::iri c2(["bd:serviceParam"]):::iri c12(["wd:Q1221156"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal c8(["wd:Q22865"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"p:P31"--> a3 a3 --"p:statement/P31"--> a4 a4 --"p:direct/P279"--> c9 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"p:P31"--> a1 a1 --"p:statement/P31"--> a2 a2 --"p:direct/P279"--> c8 end union0r <== or ==> union0l end v1 --"p:direct/P131"--> v2 v2 --"p:direct/P31"--> c12