query-e4c00545cc174bf5ceceea33786ac68f
: Sure. You already selected the variable ?layer, so I just added 3 different bindings for it: Epìdosis@
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#>
#Biblioteche, musei e chiese a Roma
#defaultView:Map{"hide":["?coordinate"], "layer": "?typeLabel"}
SELECT DISTINCT
?luogo ?luogoLabel ?luogoDescription
?coordinate ?typeLabel ?img
WHERE
{
VALUES ?type { wd:Q7075 wd:Q33506 wd:Q16970 } # biblioteca, museo e chiesa
?luogo wdt:P131/wdt:P131* wd:Q220 .
?luogo wdt:P31/wdt:P279* ?type.
OPTIONAL { ?luogo wdt:P625 ?coordinate . }
OPTIONAL { ?luogo wdt:P18 ?img }
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coordinate"):::projected
v4("?img"):::projected
v2("?luogo"):::projected
v1("?type")
a1((" "))
a2((" "))
c8(["bd:serviceParam"]):::iri
c10(["it,en"]):::literal
c2(["wd:Q220"]):::iri
bind0[/VALUES ?type/]
bind0-->v1
bind00(["wd:Q7075"])
bind00 --> bind0
bind01(["wd:Q33506"])
bind01 --> bind0
bind02(["wd:Q16970"])
bind02 --> bind0
v2 --"wdt:P131"--> a1
a1 --"wdt:P131"--> c2
v2 --"wdt:P31"--> a2
a2 --"wdt:P279"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P625".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v4
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end