query-c9ef412fe3f9e3a2cb24d1c39efc5b9e
Artists
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
?artworks
?artist ?artistLabel
(CONCAT("#visualartist/", SUBSTR(STR(?artist), 32)) AS ?artistUrl)
?example_artwork ?example_artworkLabel
(CONCAT("#artwork/", SUBSTR(STR(?example_artwork), 32)) AS ?example_artworkUrl)
WHERE {
{
SELECT
(COUNT(?artwork) AS ?artworks)
?artist
(SAMPLE(?artwork) AS ?example_artwork)
WHERE {
?artwork wdt:P608 target: ;
wdt:P170 ?artist .
}
GROUP BY ?artist
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en,cz,da,de,fi,fr,nb,nn,sv". }
}
ORDER BY DESC(?artworks)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?artist"):::projected
v5("?artistUrl")
v2("?artwork")
v4("?artworks"):::projected
v4("?example_artwork"):::projected
v6("?example_artworkUrl")
c5(["bd:serviceParam"]):::iri
c2([http://www.wikidata.org/entity/Q128933830]):::iri
c7(["#91;AUTO_LANGUAGE#93;,mul,en,cz,da,de,fi,fr,nb,nn,sv"]):::literal
v2 --"wdt:P608"--> c2
v2 --"wdt:P170"--> 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('#visualartist/',substring(str(?artist),'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