query-a82747510cb5444de594d00ff87fb2e3
Editors by edited works
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#>
SELECT
?works
?editor ?editorLabel
(CONCAT("#editor/", SUBSTR(STR(?editor), 32)) AS ?editorUrl)
?editorDescription
?example_work ?example_workLabel
(CONCAT("#work/", SUBSTR(STR(?example_work), 32)) AS ?example_workUrl)
WHERE {
{
SELECT
(COUNT(?work) AS ?works)
?editor
(SAMPLE(?work) AS ?example_work)
WHERE {
?work wdt:P98 ?editor .
}
GROUP BY ?editor
ORDER BY DESC(?works)
LIMIT 1000
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?works)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?editor"):::projected
v5("?editorUrl")
v4("?example_work"):::projected
v6("?example_workUrl")
v2("?work")
v4("?works"):::projected
c3(["bd:serviceParam"]):::iri
c5(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P98"--> 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;
c3 --"wikibase:language"--> c5
end
bind4[/"concat('#editor/',substring(str(?editor),'32^^xsd:integer'))"/]
v3 --o bind4
bind4 --as--o v5
bind5[/"concat('#work/',substring(str(?example_work),'32^^xsd:integer'))"/]
v4 --o bind5
bind5 --as--o v6