query-9c1c39d4ecbca8aafddb18a5477202f3
TODO
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#>
#Centres educatius de Catalunya segons si tenen foto
SELECT ?item ?itemLabel ?tipusLabel ?coor ?layerLabel ?imatge WHERE {
VALUES ?tipus {
wd:Q111236457
wd:Q50359544
wd:Q111244857
wd:Q111594067
}
?item wdt:P31 ?tipus.
?item wdt:P625 ?coor.
OPTIONAL {?item wdt:P18 ?imatge}
BIND(BOUND(?imatge) as ?layer)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
#defaultView:Map
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coor"):::projected
v4("?imatge"):::projected
v2("?item"):::projected
v5("?layer")
v1("?tipus")
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?tipus/]
bind0-->v1
bind00(["wd:Q111236457"])
bind00 --> bind0
bind01(["wd:Q50359544"])
bind01 --> bind0
bind02(["wd:Q111244857"])
bind02 --> bind0
bind03(["wd:Q111594067"])
bind03 --> bind0
v2 --"wdt:P31"--> v1
v2 --"wdt:P625"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v4
end
bind1[/"bound(?imatge)"/]
v4 --o bind1
bind1 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end