query-18f3baabefed51c478f7536b76d5de00
Authors
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/Q205139>
SELECT
?works
?author ?authorLabel
(CONCAT("#author/", SUBSTR(STR(?author), 32)) AS ?authorUrl)
?authorDescription
?example_work ?example_workLabel
WHERE {
{
SELECT
(COUNT(?work) AS ?works)
?author
(SAMPLE(?work) AS ?example_work)
WHERE {
?work wdt:P86 target: ;
wdt:P676 ?author .
}
GROUP BY ?author
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,da,de,fr,nb,nn,sv". }
}
ORDER BY DESC(?works)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?author"):::projected
v5("?authorUrl")
v4("?example_work"):::projected
v2("?work")
v4("?works"):::projected
c5(["bd:serviceParam"]):::iri
c7(["#91;AUTO_LANGUAGE#93;,en,da,de,fr,nb,nn,sv"]):::literal
c2([http://www.wikidata.org/entity/Q205139]):::iri
v2 --"wdt:P86"--> c2
v2 --"wdt:P676"--> v3
bind2[/"count(?work)"/]
v2 --o bind2
bind2 --as--o v4
bind3[/"sample(?work)"/]
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('#author/',substring(str(?author),'32^^xsd:integer'))"/]
v3 --o bind4
bind4 --as--o v5