query-57eedf89fc2b20339ebf9b317729d188
Top topics through time
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#>
#defaultView:AreaChart
PREFIX target1: <http://www.wikidata.org/entity/Q4744266>
PREFIX target2: <http://www.wikidata.org/entity/Q1492760>
SELECT
?year
?works
?topic ?topicLabel
WHERE {
{
SELECT
?year
(COUNT(?work) AS ?works)
?topic
WHERE {
{
SELECT
?work
WHERE {
?work wdt:P1433 target1: ;
wdt:P921 target2: .
}
} {
SELECT
(COUNT(?work) AS ?count)
?topic
WHERE {
INCLUDE %works
?work wdt:P921 ?topic .
}
GROUP BY ?topic
ORDER BY DESC(?count)
LIMIT 5
} ?work wdt:P921 ?topic ;
wdt:P577 ?publication_datetime .
BIND(STR(YEAR(?publication_datetime)) AS ?year)
}
GROUP BY ?year ?topic
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?year