query-5e045d1128a47c5b3f852acc97674fef
Things depicted in art works of the Khalili Collections (all depictions of things that have an image)
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 schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:ImageGrid{"hide" :["?image"]}
#title: Things depicted in art works of the Khalili Collections
SELECT (URI(CONCAT("https://tools.wmflabs.org/reasonator/?q=", STRAFTER(STR(?depicted),"/entity/") )) as ?q) (?nameplusdesc AS ?qLabel) ?image WHERE {
?work wdt:P195/wdt:P361 wd:Q63160499; wdt:P18 ?image ; wdt:P973 ?link; wdt:P180 ?depicted.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?depicted rdfs:label ?name . ?depicted schema:description ?desc }
BIND(IF(BOUND(?desc), CONCAT(?name, ", ", ?desc), ?name) AS ?nameplusdesc)
}
ORDER BY UCASE(?qLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?depicted"):::projected
v7("?desc")
v3("?image"):::projected
v4("?link")
v6("?name")
v8("?nameplusdesc"):::projected
v9("?q")
v10("?qLabel")
v2("?work")
a1((" "))
c8(["bd:serviceParam"]):::iri
c3(["wd:Q63160499"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P195"--> a1
a1 --"wdt:P361"--> c3
v2 --"wdt:P18"--> v3
v2 --"wdt:P973"--> v4
v2 --"wdt:P180"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
v5 --"rdfs:label"--> v6
v5 --"schema:description"--> v7
end
bind0[/"if(bound(?desc),concat(?name,', ',?desc),?name)"/]
v7 --o bind0
v6 --o bind0
bind0 --as--o v8
bind1[/"concat('https://tools.wmflabs.org/reasonator/?q=',substring-after(str(?depicted),'/entity/'))"/]
v5 --o bind1
bind1 --as--o v9
bind2[/"?nameplusdesc"/]
v8 --o bind2
bind2 --as--o v10