I need all years in a given range as values in sparql (especially for the sesame implementation).
Is there any way to "generate" new numbers in sparql like:
SELECT (RANGE(2,10) AS ?numbers)
WHERE{}
I need all years in a given range as values in sparql (especially for the sesame implementation).
Is there any way to "generate" new numbers in sparql like:
SELECT (RANGE(2,10) AS ?numbers)
WHERE{}
Without taking a deeper look, one naive answer in the spirit of RDF is to materialize the numbers and then use FILTER for the range. In other words, just insert them into the graph:
And have a pattern in the WHERE section:
As commented above, it is hard to imagine a use case for "knowing" numbers: what you get will be cross-product with everything else in the query, unless getting numbers is the only purpose of the query or some filtering being applied (in the latter case there is no need to generate numbers at all).