Re: total number of results

Rahul Patil wrote:
> Hi All,
> 
> Rather a simple (may be stupid) SPARQL question.
> Is it possible to get total number of results back for a SPARQL query; 
> without actually getting all the results back? like ASK tells if results 
> are present; Is there anything which tells how many of them are present?

Hi Rahul,

It's not a stupid question at all. SPARQL does not provide a standard 
way to do this (a la COUNT in SQL).

However, many SPARQL implementations do extend the language with support 
for COUNT. Some examples include:

ARQ (http://seaborne.blogspot.com/2007/09/counting-and-group-by.html)
Virtuoso (http://docs.openlinksw.com/virtuoso/rdfsparqlaggregate.html)
ARC (http://arc.semsol.org/docs/v2/sparql+)
RAP 
(http://www.informatik.uni-leipzig.de/~auer/publication/sparql-enhancements.pdf)
Glitter 
(http://www.thefigtrees.net/lee/blog/2007/10/announcing_open_anzo_25_releas.html)

More generally, I'm working to add information on this and other common 
SPARQL extensions to the ESW Wiki and the SPARQL FAQ; I'll post here 
when I've done that.

Lee

Received on Thursday, 31 January 2008 16:28:02 UTC