query-2733a826b93b52f8ba92adfa81db6c70
All hospitals of selected types in Berlin
SELECT DISTINCT ?hospital ?hospitalLabel ?coord WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
?hospital (wdt:P31/wdt:P279) ?hospitalType .
FILTER (?hospitalType = wd:Q16917 ||
?hospitalType = wd:Q1059324 ||
?hospitalType = wd:Q4284971 ||
?hospitalType = wd:Q569500 ||
?hospitalType = wd:Q64624840 ||
?hospitalType = wd:Q46124 ||
?hospitalType = wd:Q695416 ||
?hospitalType = wd:Q61794666 ||
?hospitalType = wd:Q688829 ||
?hospitalType = wd:Q210999 ||
?hospitalType = wd:Q1391390 ||
?hospitalType = wd:Q1774898 ||
?hospitalType = wd:Q5166147 ||
?hospitalType = wd:Q7315485 ||
?hospitalType = wd:Q13171852 ||
?hospitalType = wd:Q2424154 ||
?hospitalType = wd:Q644264 ||
?hospitalType = wd:Q22914759 ||
?hospitalType = wd:Q25004734 ||
?hospitalType = wd:Q42297537 ||
?hospitalType = wd:Q64578911 ||
?hospitalType = wd:Q96243215 ||
?hospitalType = wd:Q2387974 ||
?hospitalType = wd:Q1009272 ||
?hospitalType = wd:Q1877467 ||
?hospitalType = wd:Q3145296 ||
?hospitalType = wd:Q5154967 ||
?hospitalType = wd:Q5466630 ||
?hospitalType = wd:Q6672116 ||
?hospitalType = wd:Q7048982 ||
?hospitalType = wd:Q7309759 ||
?hospitalType = wd:Q7883677 ||
?hospitalType = wd:Q1706476 ||
?hospitalType = wd:Q1813474)
?hospital (wdt:P131/wdt:P127/wdt:P137*) wd:Q64 .
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 hospitals of selected types in Berlin
SELECT DISTINCT ?hospital ?hospitalLabel ?coord WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],de". }
?hospital (wdt:P31*/wdt:P279*) ?hospitalType .
FILTER (?hospitalType = wd:Q16917 ||
?hospitalType = wd:Q1059324 ||
?hospitalType = wd:Q4284971 ||
?hospitalType = wd:Q569500 ||
?hospitalType = wd:Q64624840 ||
?hospitalType = wd:Q46124 ||
?hospitalType = wd:Q695416 ||
?hospitalType = wd:Q61794666 ||
?hospitalType = wd:Q688829 ||
?hospitalType = wd:Q210999 ||
?hospitalType = wd:Q1391390 ||
?hospitalType = wd:Q1774898 ||
?hospitalType = wd:Q5166147 ||
?hospitalType = wd:Q7315485 ||
?hospitalType = wd:Q13171852 ||
?hospitalType = wd:Q2424154 ||
?hospitalType = wd:Q644264 ||
?hospitalType = wd:Q22914759 ||
?hospitalType = wd:Q25004734 ||
?hospitalType = wd:Q42297537 ||
?hospitalType = wd:Q64578911 ||
?hospitalType = wd:Q96243215 ||
?hospitalType = wd:Q2387974 ||
?hospitalType = wd:Q1009272 ||
?hospitalType = wd:Q1877467 ||
?hospitalType = wd:Q3145296 ||
?hospitalType = wd:Q5154967 ||
?hospitalType = wd:Q5466630 ||
?hospitalType = wd:Q6672116 ||
?hospitalType = wd:Q7048982 ||
?hospitalType = wd:Q7309759 ||
?hospitalType = wd:Q7883677 ||
?hospitalType = wd:Q1706476 ||
?hospitalType = wd:Q1813474)
?hospital (wdt:P131*/wdt:P127*/wdt:P137*) wd:Q64 .
OPTIONAL { ?hospital wdt:P625 ?coord. }
}