query-b4b9b1832116e248c84df209200c544f
Depictions
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/Q671384>
SELECT
?artworks
?depiction ?depictionLabel
(CONCAT("#depiction/", SUBSTR(STR(?depiction), 32)) AS ?depictionUrl)
?depictionDescription
?example_artwork ?example_artworkLabel
(CONCAT("#artwork/", SUBSTR(STR(?example_artwork), 32)) AS ?example_artworkUrl)
WHERE {
{
SELECT
(COUNT(?artwork) AS ?artworks)
?depiction
(SAMPLE(?artwork) AS ?example_artwork)
WHERE {
?artwork wdt:P195 target: ;
wdt:P180 ?depiction .
}
GROUP BY ?depiction
ORDER BY DESC(?artworks)
LIMIT 200
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?artworks)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?artwork")
v4("?artworks"):::projected
v3("?depiction"):::projected
v5("?depictionUrl")
v4("?example_artwork"):::projected
v6("?example_artworkUrl")
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2([http://www.wikidata.org/entity/Q671384]):::iri
v2 --"wdt:P195"--> c2
v2 --"wdt:P180"--> v3
bind2[/"count(?artwork)"/]
v2 --o bind2
bind2 --as--o v4
bind3[/"sample(?artwork)"/]
v2 --o bind3
bind3 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
bind4[/"concat('#depiction/',substring(str(?depiction),'32^^xsd:integer'))"/]
v3 --o bind4
bind4 --as--o v5
bind5[/"concat('#artwork/',substring(str(?example_artwork),'32^^xsd:integer'))"/]
v4 --o bind5
bind5 --as--o v6