query-3445c97b09b5346c1da8c9a2370f4e4a

rq turtle/ttl

Temples and palaces in India

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 ?building ?buildingLabel ?place ?placeLabel WHERE {
VALUES ?type { wd:Q32815 wd:Q16560 } # palaces, temples . mosques= wd:Q44539 
  ?building wdt:P31/wdt:P279* ?type;
          wdt:P17 wd:Q668. # in India
OPTIONAL{ ?building wdt:P131 ?place }
OPTIONAL{ ?building wdt:P625 ?coords }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,id". }
} ORDER BY ?regionLabel ?placelabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?building"):::projected v6("?coords") v5("?place"):::projected v2("?placelabel") v1("?regionLabel") v3("?type") a1((" ")) c8(["bd:serviceParam"]):::iri c4(["wd:Q668"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en,id"]):::literal bind0[/VALUES ?type/] bind0-->v3 bind00(["wd:Q32815"]) bind00 --> bind0 bind01(["wd:Q16560"]) bind01 --> bind0 v4 --"wdt:P31"--> a1 a1 --"wdt:P279"--> v3 v4 --"wdt:P17"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P131".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."wdt:P625".-> v6 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end