Aggregates and project expressions must be enclosed in brackets and be
aliased I.e.

SELECT (COUNT(*) AS ?count) WHERE { ?s ?p ?o }

Otherwise they are illegal syntax which ARQ rejects.

Hope this helps,

Rob



On 8/1/13 1:29 PM, "Iain Ritchie" <[email protected]> wrote:

>Hi,
>
>I would like to execute a COUNT(*) type query in Jena:
>
>SELECT count (*) WHERE {?s ?p ?o}
>
>I get a QueryParseException when trying to execute:
>
>com.hp.hpl.jena.query.QueryParseException Encountered " "count" "count
>"" at line 1, column 8.
>
>String queryString = "SELECT count (*) WHERE {?s ?p ?o} ";
>Query query = QueryFactory.create(queryString);
>
>Any suggestions how this might be achievable without iterating through
>the ResultSet?
>
>Many Thanks in advance.

Reply via email to