query-a53f3e9f49efdcfc62f4915a051b4aea
Related exhibitions
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX target: <http://www.wikidata.org/entity/Q128933830>
SELECT
?score
?exhibition ?exhibitionLabel
(CONCAT("#exhibition/", SUBSTR(STR(?exhibition), 32)) AS ?exhibitionUrl)
?exhibitionDescription
?example_artwork ?example_artworkLabel
(CONCAT("#artwork/", SUBSTR(STR(?example_artwork), 32)) AS ?example_artworkUrl)
WHERE {
{
SELECT
(SUM(?score_) AS ?score)
?exhibition
(SAMPLE(?artwork) AS ?example_artwork)
WHERE {
{
BIND(2 AS ?score_)
?artwork wdt:P608 target: , ?exhibition .
}
UNION
{
BIND(1 AS ?score_)
?artwork wdt:P608 target: ;
wdt:P170 ?artist .
?artist ^wdt:P170 / wdt:P608 ?exhibition .
}
FILTER (?exhibition != target:)
}
GROUP BY ?exhibition
ORDER BY DESC(?score)
LIMIT 500
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en,cz,da,de,fr,nb,nn,sv". }
}
ORDER BY DESC(?score)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?artist")
v4("?artwork")
v6("?example_artwork"):::projected
v8("?example_artworkUrl")
v2("?exhibition"):::projected
v7("?exhibitionUrl")
v6("?score"):::projected
v5("?score_")
a1((" "))
c5(["bd:serviceParam"]):::iri
c1([http://www.wikidata.org/entity/Q128933830]):::iri
c7(["#91;AUTO_LANGUAGE#93;,mul,en,cz,da,de,fr,nb,nn,sv"]):::literal
f0[["?exhibition != http://www.wikidata.org/entity/Q128933830"]]
f0 --> v2
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
bind1[/"'1^^xsd:integer'"/]
bind1 --as--o v5
v4 --"wdt:P608"--> c1
v4 --"wdt:P170"--> v5
a1 --"wdt:P170"--> v5
a1 --"wdt:P608"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
bind2[/"'2^^xsd:integer'"/]
bind2 --as--o v5
v4 --"wdt:P608"--> c1
v4 --"wdt:P608"--> v2
end
union0r <== or ==> union0l
end
bind5[/"sum(?score_)"/]
v5 --o bind5
bind5 --as--o v6
bind6[/"sample(?artwork)"/]
v4 --o bind6
bind6 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
bind7[/"concat('#exhibition/',substring(str(?exhibition),'32^^xsd:integer'))"/]
v2 --o bind7
bind7 --as--o v7
bind8[/"concat('#artwork/',substring(str(?example_artwork),'32^^xsd:integer'))"/]
v6 --o bind8
bind8 --as--o v8