Silvia,

How old is your version of Virtuoso? HAVING syntax is supported not from
the very beginning in SPARQL/BI, it's relatively new thing. Before that
that required a combination of a sub-SELECT with grouping and WHERE in
the outer select, something like

SPARQL SELECT ?s ?total
WHERE { {
        SELECT ?s SUM(?books) as ?total
        FROM <http://mygraph.person>
        WHERE
          {
            ?s  <http://mygraph/person/books> ?books .
          } }
    FILTER (?total > 2) }


Best Regards,

Ivan Mikhailov
OpenLink Virtuoso
http://virtuoso.openlinksw.com



Reply via email to