query-84571de337e72e70d1941c9de708947c
- Number of publications per year for group of the authors
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#defaultView:BarChart
SELECT ?year ?number_of_works ?author_label WHERE {
{
SELECT ?year ?number_of_works ?author ?author_label_
WHERE {
{
SELECT ?author ?year (COUNT(?work) AS ?number_of_works) WHERE {
VALUES ?author { wd:Q4484888 wd:Q63809637 wd:Q63808847 wd:Q63759170 }
?work wdt:P50 ?author .
?work wdt:P577 ?publication_date .
BIND(STR(YEAR(?publication_date)) AS ?year)
}
GROUP BY ?author ?year
}
?author rdfs:label ?author_label_ .
FILTER (LANG(?author_label_) = 'en')
}
}
# Represent the author by name and Q identifier
BIND (CONCAT(?author_label_, " (", SUBSTR(STR(?author), 32), ")") AS ?author_label)
}
ORDER BY ?year
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?author")
v7("?author_label"):::projected
v2("?author_label_")
v6("?number_of_works"):::projected
v5("?publication_date")
v4("?work")
v6("?year"):::projected
f0[["?author_label_ = 'en'"]]
f0 --> v2
bind1[/VALUES ?author/]
bind1-->v3
bind10(["wd:Q4484888"])
bind10 --> bind1
bind11(["wd:Q63809637"])
bind11 --> bind1
bind12(["wd:Q63808847"])
bind12 --> bind1
bind13(["wd:Q63759170"])
bind13 --> bind1
v4 --"wdt:P50"--> v3
v4 --"wdt:P577"--> v5
bind2[/"str(year-from-dateTime(?publication_date))"/]
v5 --o bind2
bind2 --as--o v6
bind4[/"count(?work)"/]
v4 --o bind4
bind4 --as--o v6
v3 --"rdfs:label"--> v2
bind5[/"concat(?author_label_,' (',substring(str(?author),'32^^xsd:integer'),')')"/]
v2 --o bind5
v3 --o bind5
bind5 --as--o v7