rdf - range function in sparql -
i need years in given range values in sparql (especially sesame implementation).
is there way "generate" new numbers in sparql like:
select (range(2,10) ?numbers) where{}
without taking deeper look, 1 naive answer in spirit of rdf materialize numbers , use filter range. in other words, insert them graph:
ex:year ex:anumber "1900"^^xsd:integer . ex:year ex:anumber "1901"^^xsd:integer . ... ex:year ex:anumber "2100"^^xsd:integer .
and have pattern in section:
select ?number { ex:year ex:number ?number . filter (?number < 2020) filter (?number > 1999) }
as commented above, hard imagine use case "knowing" numbers: cross-product else in query, unless getting numbers purpose of query or filtering being applied (in latter case there no need generate numbers @ all).
Comments
Post a Comment