W3C home > Mailing lists > Public > semantic-web@w3.org > October 2010

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

From: Olivier Rossel <olivier.rossel@gmail.com>
Date: Fri, 15 Oct 2010 22:23:37 +0200
Message-ID: <AANLkTinkL54eK7YUt=-tOQq6jcQnqr+Rny5CzG7GnL1h@mail.gmail.com>
To: Semantic Web <semantic-web@w3.org>
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.

Thanks.

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

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:45:20 UTC