query-f8ae1af1974e3ac4327878e3604ed2e8
Propertiesinstance of (P31)located in the administrative territorial entity (P131)
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?len ?lml ?district ?dsten ?dstml ?dsthi WHERE {
?item wdt:P31 wd:Q15284.
?item wdt:P131/wdt:P131* wd:Q1186.
?item wdt:P131 ?district.
OPTIONAL { ?item wdt:P131 ?division. ?division wdt:P31 wd:Q24943410 }
OPTIONAL { ?item rdfs:label ?Lang. FILTER(LANG(?Lang)="ml") }
OPTIONAL { ?item rdfs:label ?len. FILTER(LANG(?len)="en") }
OPTIONAL { ?item rdfs:label ?lml. FILTER(LANG(?lml)="ml") }
OPTIONAL { ?item schema:description ?den. FILTER(LANG(?den)="en") }
OPTIONAL { ?item schema:description ?dml. FILTER(LANG(?dml)="ml") }
OPTIONAL { ?district rdfs:label ?dsten. FILTER(LANG(?dsten)="en") }
OPTIONAL { ?district rdfs:label ?dstml. FILTER(LANG(?dstml)="ml") }
OPTIONAL { ?district rdfs:label ?dsthi. FILTER(LANG(?dsthi)="hi") }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?Lang")
v5("?den")
v10("?district"):::projected
v11("?division")
v4("?dml")
v3("?dsten"):::projected
v1("?dsthi"):::projected
v2("?dstml"):::projected
v9("?item"):::projected
v7("?len"):::projected
v6("?lml"):::projected
a1((" "))
c5(["wd:Q15284"]):::iri
c7(["wd:Q1186"]):::iri
c8(["wd:Q24943410"]):::iri
v9 --"wdt:P31"--> c5
v9 --"wdt:P131"--> a1
a1 --"wdt:P131"--> c7
v9 --"wdt:P131"--> v10
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v9 -."wdt:P131".-> v11
v11 --"wdt:P31"--> c8
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v9 -."rdfs:label".-> v8
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v9 -."rdfs:label".-> v7
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v9 -."rdfs:label".-> v6
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v9 -."schema:description".-> v5
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v9 -."schema:description".-> v4
end
subgraph optional6["(optional)"]
style optional6 fill:#bbf,stroke-dasharray: 5 5;
v10 -."rdfs:label".-> v3
end
subgraph optional7["(optional)"]
style optional7 fill:#bbf,stroke-dasharray: 5 5;
v10 -."rdfs:label".-> v2
end
subgraph optional8["(optional)"]
style optional8 fill:#bbf,stroke-dasharray: 5 5;
v10 -."rdfs:label".-> v1
end