Warning:
This wiki has been archived and is now read-only.
CommentResponse:GK-1
> 1. Editorial > > I'm finding the section on aggregates is quite hard to follow. > > More examples, especially for GROUP_CONCAT, might make it easier > to understand the link between the algebra and its practical consequences > in SPARQL queries.
There is a balance between providing examples, and making the document too long.
The explanatory section on aggregates has been expanded, and there are now some testcases for aggregates http://www.w3.org/2009/sparql/docs/tests/data-sparql11/aggregates/ - which hopefully illustrate the behaviour.
> Also, I can't find any indication of the interaction between GROUP BY and ORDER > BY, where the ORDER BY specifies a variable not named in the GROUP BY: is this > allowed? If so, what effect does it have (e.g. on GROUP_CONCAT)?
Aggregate operations are performed on a multiset, so order is not preserved.
The group discussed this feature bu decided to postpone this feature to a future working group.
Please note: “ORDER BY after a GROUP BY must only use variables exposed by the GROUP. Use of non-grouping variable outside the GROUP BY is not legal and a required syntax error.”
For example:
SELECT ?book ?title WHERE { ?book dc:title ?title } GROUP BY ?book ORDER BY ?title ==> error.
> 2. A Nice-to-have feature
We understand that you have now seen another solution to this issue, see http://lists.w3.org/Archives/Public/public-rdf-dawg-comments/2010Oct/0001.html.
Could you please respond to this message saying whether this comment has been answered to your satisfaction.