query-1f5da378998471104179606e594fe2db
centuries here. commentDon't understand Separate code works well:
Use at
- https://query.wikidata.org/sparql
SELECT ?century
WHERE
{
# BIND(FLOOR( (1-1)/100)+1 as ?century) # first year of 1 century
# BIND(FLOOR( (100-1)/100)+1 as ?century) # last year of 1 century
# BIND(FLOOR((1999-1)/100)+1 as ?century)
BIND(FLOOR((2000-1)/100)+1 as ?century) # last year of 20 century
# BIND(FLOOR((2001-1)/100)+1 as ?century) # first year of 21 century
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?century"):::projected
bind0[/"numeric-floor('2000^^xsd:integer' + '-1^^xsd:integer' / '100^^xsd:integer') + '+1^^xsd:integer'"/]
bind0 --as--o v1