SPARQL Parse Error: unexpected terminal

258 Views Asked by At

I've been using gruff to create and execute some simple SPARQL queries, but have run into some trouble. The following query works (prefixes have been left out):

SELECT ?k
WHERE
{ ?k  rdf:type  uw:pcservice . }

However, when I introduce the COUNT function, as seen below, I get the following error in gruff:

Error: Parse error: unexpected terminal ( (value: :|(|). Expected terminals: (* varname reduced distinct). [condition type: sparql-parse-error-unexpected-terminal]

SELECT (COUNT(?k) AS ?count)
WHERE
{ ?k  rdf:type  uw:pcservice . }

Not sure what is causing this. Any clues would be appreciated. Thanks.

1

There are 1 best solutions below

0
On

Given the error it sounds like this tool doesn't support SPARQL 1.1. It's expecting a vanilla SELECT [*|varname|reduced|distinct], excluding aggregates and assignment.