query-ef79f814b7f69227efe6426f3d593bc6
Depicted
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX target: <http://www.wikidata.org/entity/Q1144593>
SELECT
?artworks
?depicted ?depictedLabel
(CONCAT("#depicted/", SUBSTR(STR(?depicted), 32)) AS ?depictedUrl)
?example_artwork ?example_artworkLabel
(CONCAT("#artwork/", SUBSTR(STR(?example_artwork), 32)) AS ?example_artworkUrl)
WHERE {
{
SELECT
(COUNT(?artwork) AS ?artworks)
?depicted
(SAMPLE(?artwork) AS ?example_artwork)
WHERE {
?artwork p:P180 ?depicted_statement .
?depicted_statement ps:P180 ?depicted ;
pq:P1354 target: .
}
GROUP BY ?depicted
} 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")
v5("?artworks"):::projected
v4("?depicted"):::projected
v6("?depictedUrl")
v3("?depicted_statement")
v5("?example_artwork"):::projected
v7("?example_artworkUrl")
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c4([http://www.wikidata.org/entity/Q1144593]):::iri
v2 --"p:P180"--> v3
v3 --"p:statement/P180"--> v4
v3 --"p:qualifier/P1354"--> c4
bind2[/"count(?artwork)"/]
v2 --o bind2
bind2 --as--o v5
bind3[/"sample(?artwork)"/]
v2 --o bind3
bind3 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end
bind4[/"concat('#depicted/',substring(str(?depicted),'32^^xsd:integer'))"/]
v4 --o bind4
bind4 --as--o v6
bind5[/"concat('#artwork/',substring(str(?example_artwork),'32^^xsd:integer'))"/]
v5 --o bind5
bind5 --as--o v7