query-b5bedd2a034f4bacf3beada1ed9acc6c
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 target1: <http://www.wikidata.org/entity/Q35>
PREFIX target2: <http://www.wikidata.org/entity/Q2539>
SELECT
?works
(CONCAT("#author/", SUBSTR(STR(?author), 32), "/topic/", SUBSTR(STR(target2:), 32)) AS ?worksUrl)
?author ?authorLabel
(CONCAT("#author/", SUBSTR(STR(?author), 32)) AS ?authorUrl)
?authorDescription
?example_work ?example_workLabel
(CONCAT("#work/", SUBSTR(STR(?example_work), 32)) AS ?example_workUrl)
WHERE {
{
SELECT
(COUNT(DISTINCT ?work) AS ?works)
?author
(SAMPLE(?work) AS ?example_work)
WHERE {
{
SELECT
?work
WHERE {
?work wdt:P921 / (wdt:P361| wdt:P1269 | wdt:P31 | wdt:P279)? target2:
}
} ?work wdt:P50 ?author .
?author ( wdt:P108 | wdt:P1416 ) / wdt:P17 target1:
}
GROUP BY ?author
} service wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
ORDER BY DESC(?works)
LIMIT 2000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?author"):::projected
v6("?authorUrl")
v4("?example_work"):::projected
v7("?example_workUrl")
v2("?work")
v4("?works"):::projected
v5("?worksUrl")
a1((" "))
a2((" "))
c2([http://www.wikidata.org/entity/Q2539]):::iri
c11([http://www.wikidata.org/entity/Q35]):::iri
c13(["bd:serviceParam"]):::iri
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v2 --"wdt:P921"--> a1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P279"--> c2
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P31"--> c2
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P1269"--> c2
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
a1 --"wdt:P361"--> c2
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
end
union0r <== or ==> union0l
end
v2 --"wdt:P50"--> v3
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P1416"--> a2
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P108"--> a2
end
union4r <== or ==> union4l
end
a2 --"wdt:P17"--> c11
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;
c13 --"wikibase:language"--> c15
end
bind4[/"concat('#author/',substring(str(?author),'32^^xsd:integer'),'/topic/',substring(str(http://www.wikidata.org/entity/Q2539),'32^^xsd:integer'))"/]
v3 --o bind4
bind4 --as--o v5
bind5[/"concat('#author/',substring(str(?author),'32^^xsd:integer'))"/]
v3 --o bind5
bind5 --as--o v6
bind6[/"concat('#work/',substring(str(?example_work),'32^^xsd:integer'))"/]
v4 --o bind6
bind6 --as--o v7