query-a3b00874497ef5cc14dd36d0d0132cca

rq turtle/ttl

Get cities and town .14:53, 21 August 2019‎ (UTC)) at contribs • talk (77.222.144.250 comment was added byunsignedThe preceding – Can you help me to get cities and town certain country? thanks a lot It's as easy as

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 ?item ?itemLabel WHERE {
  ?item wdt:P31/wdt:P279* wd:Q7930989.
  ?item wdt:P17 wd:Q159.
  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; v1("?item"):::projected a1((" ")) c5(["wd:Q159"]):::iri c7(["bd:serviceParam"]):::iri c3(["wd:Q7930989"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v1 --"wdt:P17"--> c5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end