You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by 朱曼 <zh...@gmail.com> on 2011/05/15 08:12:59 UTC

Is aggregation function supported in SPARQL?

Dear list,

Hi~

I am wondering if aggregation function is supported in SPARQL, e.g. count
function (such as we always do in SQL: select count(*) from table where
id=...)?
If I want to query for the total count of individuals of some class, can I
use a SPARQL query directly?

Look forward for your kind reply!

All my best!
June

Re: Is aggregation function supported in SPARQL?

Posted by 朱曼 <zh...@gmail.com>.
2011/5/15 Dave Reynolds <da...@gmail.com>

> On Sun, 2011-05-15 at 14:12 +0800, 朱曼 wrote:
> > Dear list,
> >
> > Hi~
> >
> > I am wondering if aggregation function is supported in SPARQL, e.g. count
> > function (such as we always do in SQL: select count(*) from table where
> > id=...)?
> > If I want to query for the total count of individuals of some class, can
> I
> > use a SPARQL query directly?
>
> Yes, up to date versions of Jena support SPARQL 1.1 which includes
> aggregation operations:
>
> http://www.w3.org/TR/sparql11-query/#aggregates
>
> Dave
>
>
> Thanks a lot~~

All the best
June

Re: Is aggregation function supported in SPARQL?

Posted by Dave Reynolds <da...@gmail.com>.
On Sun, 2011-05-15 at 14:12 +0800, 朱曼 wrote: 
> Dear list,
> 
> Hi~
> 
> I am wondering if aggregation function is supported in SPARQL, e.g. count
> function (such as we always do in SQL: select count(*) from table where
> id=...)?
> If I want to query for the total count of individuals of some class, can I
> use a SPARQL query directly?

Yes, up to date versions of Jena support SPARQL 1.1 which includes
aggregation operations:

http://www.w3.org/TR/sparql11-query/#aggregates

Dave