W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2010

Re: More Aggregates questions ... Another scalar parameter for GROUP_CONCAT?

From: Steve Harris <steve.harris@garlik.com>
Date: Thu, 7 Oct 2010 21:48:52 +0100
Cc: Andy Seaborne <andy.seaborne@epimorphics.com>, Axel Polleres <axel.polleres@deri.org>, SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <F0DB31FA-A32C-48E8-8C20-01A34C71BDBF@garlik.com>
To: Lee Feigenbaum <lee@thefigtrees.net>
On 2010-10-07, at 18:53, Lee Feigenbaum wrote:

> On 10/7/2010 10:24 AM, Andy Seaborne wrote:
>> > On 2010-10-07, at 02:50, Axel Polleres wrote:
>> >
>> >> When thinking about practical examples for GROUP_CONCAT, I can
>> hardly think of any where I wouldn't want to impose an order...
>> >> ... thus, what's the opinions about adding another scalar parameter
>> "order" which takes as parameter "DESC"|"ASC"
>> >>
>> I agree that it makes GROUP_CONCAT rather more useful to be able to
>> control the order.
>> On 07/10/10 11:18, Steve Harris wrote:
>>> My feeling is that you need ORDER BY expression to make it useful.
>> Agreed.
> I'll be a dissenting voice here -- we use GROUP_CONCAT all the time without ordering, and I'm not totally clear what use cases are addressed by ordering *based on the concatenated string values*. Could you help me understand this?

To be clear. I don't think that it needs ordering to be useful - I use it without ordering in SQL all the time.

I think that for /ordering/ to be useful it needs to be by expression, I have usecases for ORDER BY DESC(strlen(?name)) for e.g.

> (I see how useful it would be to be able to order the values based on some other variable from the group in order to have consistent orderings across multiple GROUP_CONCAT invocations within a project list, but that's different from what I think I'm reading here...)

- 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 Thursday, 7 October 2010 20:49:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:02 UTC