query-04625efc4e67af60f3a86a86594d29d0
Works of art from FCAC or FMAC (contemporary art in Geneva)
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 ?item ?itemLabel ?pic ?locationLabel ?streetAddress ?geo ?authorLabel WHERE {
VALUES ?institution {wd:Q27481225 wd:Q16636570 wd:Q3145370 wd:Q71 wd:Q123859078 wd:Q121890510} # selected institutions are FCAC, FMAC, HUG, City of Geneva, Fonds d'art de Carouge, Fonds d'art contemporain de Meyrin
?item wdt:P195 ?institution ; # item is in collection of one of the selected institutions
wdt:P625 ?geo ;
wdt:P170 ?author ;
wdt:P276 ?location ;
OPTIONAL { ?item wdt:P18 ?pic .} # get the picture as well if we can
OPTIONAL { ?location wdt:P6375 ?streetAddress .} # get the street address of location
# MINUS { ?item wdt:P18 [] } . # that lack a picture
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?author")
v3("?geo"):::projected
v1("?institution")
v2("?item"):::projected
v5("?location")
v6("?pic"):::projected
v7("?streetAddress"):::projected
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?institution/]
bind0-->v1
bind00(["wd:Q27481225"])
bind00 --> bind0
bind01(["wd:Q16636570"])
bind01 --> bind0
bind02(["wd:Q3145370"])
bind02 --> bind0
bind03(["wd:Q71"])
bind03 --> bind0
bind04(["wd:Q123859078"])
bind04 --> bind0
bind05(["wd:Q121890510"])
bind05 --> bind0
v2 --"wdt:P195"--> v1
v2 --"wdt:P625"--> v3
v2 --"wdt:P170"--> v4
v2 --"wdt:P276"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P18".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."wdt:P6375".-> v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end