query-3b61a14d0264786143673f2f9c705939
Top fonts through years
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
SELECT
?year
?works
?font ?fontLabel
WHERE {
{
SELECT
?year
(COUNT(?work) AS ?works)
?font
WHERE {
{
SELECT
(COUNT(?work) AS ?count)
?font
WHERE {
?work wdt:P2739 ?font .
}
GROUP BY ?font
ORDER BY DESC(?count)
LIMIT 5
} ?work wdt:P2739 ?font ;
wdt:P577 ?publication_datetime .
BIND(STR(YEAR(?publication_datetime)) AS ?year)
}
GROUP BY ?year ?font
} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?year
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count")
v4("?font"):::projected
v5("?publication_datetime")
v3("?work")
v6("?works"):::projected
v6("?year"):::projected
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v3 --"wdt:P2739"--> v4
bind1[/"count(?work)"/]
v3 --o bind1
bind1 --as--o v5
v3 --"wdt:P2739"--> v4
v3 --"wdt:P577"--> v5
bind2[/"str(year-from-dateTime(?publication_datetime))"/]
v5 --o bind2
bind2 --as--o v6
bind4[/"count(?work)"/]
v3 --o bind4
bind4 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end