query-22e96b84979c977349811eca529fd1bf
All Wikidata hospitals (no type specification) in Berlin SELECT ?hospital ?hospitalLabel ?coord WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". } ?hospital wdt:P31 wd:Q16917; #is hospital wdt:P17 wd:Q183; #in Germany wdt:P131 wd:Q64. #in Berlin OPTIONAL { ?hospital wdt:P625 ?coord. } }
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 bd: <http://www.bigdata.com/rdf#>
#All Wikidata hospitals (no type specification) in Berlin
SELECT ?hospital ?hospitalLabel ?coord WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
?hospital wdt:P31 wd:Q16917; #is hospital
wdt:P17 wd:Q183; #in Germany
wdt:P131 wd:Q64. #in Berlin
OPTIONAL { ?hospital wdt:P625 ?coord. }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?coord"):::projected
v1("?hospital"):::projected
c4(["#91;AUTO_LANGUAGE#93;,de"]):::literal
c2(["bd:serviceParam"]):::iri
c6(["wd:Q16917"]):::iri
c10(["wd:Q64"]):::iri
c8(["wd:Q183"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"wdt:P31"--> c6
v1 --"wdt:P17"--> c8
v1 --"wdt:P131"--> c10
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P625".-> v2
end