Hello!

At the moment I'm implementing pagination for my SPARQL queries and I can't
find out how to retrieve records count. By "count" I mean records number
that were retrieved if I didn't use OFFSET and LIMIT clauses.

Here is my sample query:

prefix events:    <http://www.semanticweb.org/ontologies/2010/1/Events.owl#>

SELECT DISTINCT ?event, count(*)
FROM <http://www.semanticweb.org/ontologies/2010/1/EventsContent.owl#> WHERE

{
?event ?property ?value .
?event events:startDateTime ?startDateTime .
FILTER (xsd:dateTime(?startDateTime) >=
xsd:dateTime("2010-04-11T15:04:58+07:00"))
}
ORDER BY ASC (xsd:dateTime(?startDateTime))
OFFSET 0
LIMIT 10

In this case count returns value as if no filtering were applied.

Regards,
Alexander

Reply via email to