Limiting a query by setting a maximum number of distinct values for a given variable.

Well, let me rephrase a little bit the subject of my mail.
I want to retrieve a set of towns, their various labels and their geolocation.
The labels can be in english and/or spanish and/or french and/or deutsch.

My data set contains a LOT of towns.
So I will limit my query.
I plan to retrieve towns data by packs of 100 towns.

My first idea was to use the SPARQL "LIMIT" and "OFFSET" keywords.
But I think they work at resultSet's row level, and each row of {town,
label, longitude, latitude}
counts for 1.

So 100 rows of the resultSet do not correspond to data for 100 distinct towns.

Is there a way to constrain my SPARQL queries to return all the data for the
first 100 towns, then all the data for the second 100 towns, etc ?

Note: oh, by the way, in my app, I use CONSTRUCT and SELECT ! I don't know if
that is an important point. But anyway... :)

Any help is gladly welcome.


Olivier Rossel

Received on Friday, 15 October 2010 20:24:10 UTC