query-ae95e608ed684e60c12937f91e872bc8

rq turtle/ttl

Schools in Thrissur DistrictUsed to fill the gaps in labels

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#>
# Created by User:Jinoy
# Schools in Thrissur District
#defaultView:Map
SELECT ?item ?ilLang ?geo ?U_DISE_code WHERE {
  { ?item wdt:P31 wd:Q9826. }
  UNION
  { ?item wdt:P31 wd:Q64063386. }
  UNION
  { ?item wdt:P31 wd:Q64063317. }
  UNION
  { ?item wdt:P31 wd:Q64062731. }
  ?item (wdt:P131*) wd:Q2429655.
  OPTIONAL {
    ?item rdfs:label ?ilLang.
    FILTER((LANG(?ilLang)) = "ml")
  }
  OPTIONAL { ?item wdt:P625 ?geo. }
  OPTIONAL { ?item wdt:P6391 ?U_DISE_code. }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?U_DISE_code"):::projected v3("?geo"):::projected v1("?ilLang"):::projected v2("?item"):::projected c8(["wd:Q2429655"]):::iri c4(["wd:Q64063386"]):::iri c6(["wd:Q64062731"]):::iri c3(["wd:Q9826"]):::iri c5(["wd:Q64063317"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c6 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c5 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c4 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c3 end union0r <== or ==> union0l end v2 --"wdt:P131"--> c8 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."rdfs:label".-> v1 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P625".-> v3 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P6391".-> v4 end