query-139c56b93dd02fc3316f4345a20f6121
(Trink-)Brunnen in der Schweiz) Queries#Fontanelle (User:Alexmar983Code via
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#>
#defaultView:Map
SELECT ?fountain ?fountainLabel ?inst ?instLabel ?coord ?img ?com ?layer
WHERE {
?fountain wdt:P31 wd:Q1630622 . # Q1630622 = Trinkbrunnen
?fountain wdt:P17 wd:Q39 . # Q39 = Switzerland
#?fountain (wdt:P131)* wd:Q1273 .
?fountain wdt:P625 ?coord .
OPTIONAL {?fountain wdt:P18 ?img}
OPTIONAL {?fountain wdt:P373 ?com}
BIND(IF(BOUND(?img) && BOUND(?com),"img & com exist",IF(BOUND(?com),"com exists",IF(BOUND(?img),"img exists","none"))) AS ?layer)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?com"):::projected
v2("?coord"):::projected
v1("?fountain"):::projected
v3("?img"):::projected
v5("?layer"):::projected
c4(["wd:Q39"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,it,en"]):::literal
c9(["bd:serviceParam"]):::iri
c2(["wd:Q1630622"]):::iri
v1 --"wdt:P31"--> c2
v1 --"wdt:P17"--> c4
v1 --"wdt:P625"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P373".-> v4
end
bind0[/"if(bound(?img)bound(?com),'img & com exist',if(bound(?com),'com exists',if(bound(?img),'img exists','none')))"/]
v3 --o bind0
v4 --o bind0
bind0 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end