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.