query-db1ab2b513588b9f4fc2fce86077c491
Map of castles in Lithuania
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
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#>
PREFIX bd: <http://www.bigdata.com/rdf#>
##title:Map of castles in Lithuania
#defaultView:Map{"hide": ["?coords", "?layer"]}
SELECT DISTINCT ?library ?libraryLabel ?coords ?layer WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?type rdfs:label ?layer.
?library rdfs:label ?libraryLabel }
?library wdt:P31 ?type .
OPTIONAL { ?library wdt:P18 ?image }.
?type wdt:P279* wd:Q23413.
?library wdt:P17 wd:Q37.
?library wdt:P625 ?coords.
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?coords"):::projected
v5("?image")
v2("?layer"):::projected
v3("?library"):::projected
v4("?libraryLabel"):::projected
v1("?type")
c2(["bd:serviceParam"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c11(["wd:Q37"]):::iri
c9(["wd:Q23413"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
v1 --"rdfs:label"--> v2
v3 --"rdfs:label"--> v4
end
v3 --"wdt:P31"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P18".-> v5
end
v1 --"wdt:P279"--> c9
v3 --"wdt:P17"--> c11
v3 --"wdt:P625"--> v6