- From: Steve Harris <steve.harris@garlik.com>
- Date: Tue, 19 Apr 2011 23:22:27 +0100
- To: Andy Seaborne <andy.seaborne@epimorphics.com>
- Cc: public-rdf-dawg@w3.org
On 2011-04-19, at 21:50, Andy Seaborne wrote:
>
>
> On 19/04/11 21:34, Steve Harris wrote:
>> Ping?
>>
>> - Steve
>
> [[
> > 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. We have added an ISSUE [1] about whether or not to allow order for aggregates, which we will address if time allows it before going to last call. However, since we are on a tight schedule, we might have to move this feature for a future working group.
> ]]
>
> Suggest adding:
> """
> 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.
Good suggestion, thanks.
- Steve
--
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203 http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Tuesday, 19 April 2011 22:23:03 UTC