query-efc5988361c07a2403aefd2907d70ca8
sans photoPour avoir les éléments sans photo, ajouter:
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#>
# Tous les hôpitaux
#defaultView:Map
SELECT ?item ?itemLabel ?coord WHERE {
?item (wdt:P31/wdt:P279*) wd:Q16917.
# On filtre pour les entrées qui n'ont pas de photos
OPTIONAL { ?item wdt:P18 ?pic }
FILTER(# Pas de photo
!BOUND(?pic)
)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
OPTIONAL { ?item wdt:P625 ?coord. }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coord"):::projected
v2("?item"):::projected
v1("?pic")
a1((" "))
c6(["bd:serviceParam"]):::iri
c3(["wd:Q16917"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["not bound(?pic)"]]
f0 --> v1
v2 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P625".-> v3
end