query-19d612130d80df0c8579988d412d33dc

rq turtle/ttl

Dams in Kerala SELECT ?item ?len ?dsten WHERE { ?item wdt:P31 wd:Q12323. ?item wdt:P17 wd:Q668. ?item wdt:P131/wdt:P131* wd:Q1186. ?item wdt:P131 ?district. OPTIONAL { ?district rdfs:label ?dsten. FILTER(LANG(?dsten)="en") } OPTIONAL { ?item rdfs:label ?len. FILTER(LANG(?len)="en") } }

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#Dams in Kerala
 SELECT ?item ?len ?dsten WHERE {
   ?item wdt:P31 wd:Q12323.
   ?item wdt:P17 wd:Q668.
   ?item wdt:P131/wdt:P131* wd:Q1186.
   ?item wdt:P131 ?district.
   OPTIONAL { ?district rdfs:label ?dsten. FILTER(LANG(?dsten)="en") }
   OPTIONAL { ?item rdfs:label ?len. FILTER(LANG(?len)="en") }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?district") v2("?dsten"):::projected v3("?item"):::projected v1("?len"):::projected a1((" ")) c5(["wd:Q668"]):::iri c7(["wd:Q1186"]):::iri c3(["wd:Q12323"]):::iri v3 --"wdt:P31"--> c3 v3 --"wdt:P17"--> c5 v3 --"wdt:P131"--> a1 a1 --"wdt:P131"--> c7 v3 --"wdt:P131"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."rdfs:label".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."rdfs:label".-> v1 end