[ 
https://issues.apache.org/jira/browse/JENA-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15984434#comment-15984434
 ] 

Lorenz Bühmann commented on JENA-1327:
--------------------------------------

Great, thank's for the explanation.
That means Virtuoso is doing it wrong, which is what I first assumed but then 
was pointed to the {{HAVING}} part in the specs by one of the developers, see 
the discussion 
[here|http://stackoverflow.com/questions/43617385/i-am-trying-to-get-list-of-all-the-authors-who-have-had-more-than-3-piece-of-wor].

> HAVING clause accepts projected expression
> ------------------------------------------
>
>                 Key: JENA-1327
>                 URL: https://issues.apache.org/jira/browse/JENA-1327
>             Project: Apache Jena
>          Issue Type: Question
>          Components: ARQ
>    Affects Versions: Jena 3.1.1, Jena 3.2.0
>            Reporter: Lorenz Bühmann
>            Priority: Minor
>
> I'm wondering whether the SPARQL parser is correct with accepting the 
> following query:
> {noformat}
> PREFIX  dbo:  <http://purl.org/dc/elements/1.1/>
> SELECT  (COUNT(?work) AS ?tw) ?author
> WHERE
>   { ?work  dbo:author  ?author }
> GROUP BY ?author
> HAVING ( ?tw > 3 )
> {noformat}
> According to the 
> [specs|https://www.w3.org/TR/sparql11-query/#sparqlHavingClause], I would 
> assume that this is not allowed and one has to use
> {noformat}
> PREFIX  dbo:  <http://purl.org/dc/elements/1.1/>
> SELECT  (COUNT(?work) AS ?tw) ?author
> WHERE
>   { ?work  dbo:author  ?author }
> GROUP BY ?author
> HAVING ( COUNT(?tw) > 3 )
> {noformat}
> But as always, I might misunderstand the specs. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to