query-0a1c633ec676cf028f3e9f3abde02d98
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#title:Count of centuries of birth
#defaultView:LineChart
SELECT ?century (COUNT(?item) AS ?count) #(CONCAT(STR(?century),"..") as ?centuries)
WHERE {
?item wdt:P9114 ?id .
?item wdt:P569 ?birth .
BIND(YEAR(?birth)-1 as ?year). #-1 means 1801-1900, without -1 means 1800-1899
FILTER(BOUND(?year)).
BIND (FLOOR(?year/100) as ?century).
} GROUP BY ?century
ORDER BY ?century
Query found at
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/Queries
- https://www.wikidata.org/wiki/User:Ep%C3%ACdosis/sandbox
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?birth")
v6("?century"):::projected
v6("?count")
v4("?id")
v3("?item"):::projected
v6("?year")
f0[["bound(?year)"]]
f0 --> v6
v3 --"wdt:P9114"--> v4
v3 --"wdt:P569"--> v5
bind1[/"year-from-dateTime(?birth) + '-1^^xsd:integer'"/]
v5 --o bind1
bind1 --as--o v6
bind2[/"numeric-floor(?year / '100^^xsd:integer')"/]
v6 --o bind2
bind2 --as--o v6
bind4[/"count(?item)"/]
v3 --o bind4
bind4 --as--o v6