Hello Silvia, It should be
select ?s SUM(?books) as ?total FROM <http://mygraph.person> WHERE {?s <http://mygraph/person/books> ?books . } having (sum(?books) > 2) There's no ?total in the scope of HAVING, but there are bindings of ?books and the ability of using aggregates. Best Regards, Ivan Mikhailov OpenLink Software http://virtuoso.openlinksw.com On Fri, 2010-07-02 at 11:13 +0200, Silvia Stefanova wrote: > Hello, > > I would like to make a SPARQL query with aggregation with a condition on > the result of the aggregate, e.g.: > > select ?s SUM(?books) as ?total > FROM <http://mygraph.person> > WHERE {?s <http://mygraph/person/books> ?books.} > having (?total > 2) . > > Would you please tell me how to make this in Virtuoso? > > Regards, > Silvia > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Virtuoso-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/virtuoso-users
