query-581beea6b1fff9259eef0d5614a5f71a

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 bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel ?itemDescription ?type ?typeLabel ?locatedIn ?locatedInLabel ?pop ?coord
WHERE 
{
  VALUES ?type {
    wd:Q12443800 # state
    wd:Q467745 # union territory
    wd:Q515 # city
    wd:Q1549591 # big city 
  }
  ?item wdt:P31 ?type.  
  ?item wdt:P17 wd:Q668.
  ?item wdt:P131 ?locatedIn.
  OPTIONAL {?item wdt:P1082 ?pop. }
  OPTIONAL {?item wdt:P625 ?coord . } 
  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("?coord"):::projected v2("?item"):::projected v3("?locatedIn"):::projected v4("?pop"):::projected v1("?type"):::projected c8(["bd:serviceParam"]):::iri c3(["wd:Q668"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal bind0[/VALUES ?type/] bind0-->v1 bind00(["wd:Q12443800"]) bind00 --> bind0 bind01(["wd:Q467745"]) bind01 --> bind0 bind02(["wd:Q515"]) bind02 --> bind0 bind03(["wd:Q1549591"]) bind03 --> bind0 v2 --"wdt:P31"--> v1 v2 --"wdt:P17"--> c3 v2 --"wdt:P131"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P1082".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P625".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end