query-0a6d6a447cf14e21c9804cef3b71452f

rq turtle/ttl

List all available hospital types SELECT ?hospital ?hospitalLabel ?hospitalType WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } ?hospital wdt:P279 ?hospitalType; FILTER (?hospitalType = wd:Q16917 || ?hospitalType = wd:Q4260475) }

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#>
#List all available hospital types
SELECT ?hospital ?hospitalLabel ?hospitalType WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?hospital wdt:P279 ?hospitalType;
  FILTER (?hospitalType = wd:Q16917 || ?hospitalType = wd:Q4260475)
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?hospital"):::projected v1("?hospitalType"):::projected c4(["bd:serviceParam"]):::iri c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["(?hospitalType = 'wd:Q16917' || ?hospitalType = 'wd:Q4260475')"]] f0 --> v1 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end v2 --"wdt:P279"--> v1