query-3b4beeb0edc3ed6b6972888869c89250

rq turtle/ttl

Queries

Use at

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 ?item ?itemLabel ?nativeLabel ?territory ?territoryLabel ?location ?locationLabel WHERE {
  ?item wdt:P31/(wdt:P279*) wd:Q16970.
  ?item wdt:P17 wd:Q20.
  OPTIONAL { ?item wdt:P131 ?territory }
  OPTIONAL { ?item wdt:P276 ?location }
  OPTIONAL { ?item wdt:P1705 ?nativeLabel }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en"  }  
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v3("?location"):::projected v4("?nativeLabel"):::projected v2("?territory"):::projected a1((" ")) c10(["bd:serviceParam"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en,en"]):::literal c5(["wd:Q20"]):::iri c3(["wd:Q16970"]):::iri v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v1 --"wdt:P17"--> c5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P131".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P276".-> v3 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1705".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end