query-27c1610f5557ca2db52447ea8d35fe2e
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/Q35>
SELECT
?works
?author ?authorLabel
(CONCAT("/#author/", SUBSTR(STR(?author), 32)) AS ?authorUrl)
?authorDescription
?example_work ?example_workLabel
WHERE {
{
SELECT
(COUNT(DISTINCT ?work) AS ?works)
?author
(SAMPLE(?work) AS ?example_work)
WHERE {
?author wdt:P27| (wdt:P108 / wdt:P17) target: ;
^wdt:P50 ?work .
}
GROUP BY ?author
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?works)
LIMIT 500
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?author"):::projected
v5("?authorUrl")
v4("?example_work"):::projected
v3("?work")
v4("?works"):::projected
a1((" "))
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c2([http://www.wikidata.org/entity/Q35]):::iri
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P108"--> a1
a1 --"wdt:P17"--> c2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P27"--> c2
end
union0r <== or ==> union0l
end
v3 --"wdt:P50"--> v2
bind2[/"count(?work)"/]
v3 --o bind2
bind2 --as--o v4
bind3[/"sample(?work)"/]
v3 --o bind3
bind3 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind4[/"concat('/#author/',substring(str(?author),'32^^xsd:integer'))"/]
v2 --o bind4
bind4 --as--o v5