W3C home > Mailing lists > Public > public-rdf-dawg-comments@w3.org > August 2005

Re: GROUP BY

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Sun, 21 Aug 2005 18:33:10 +0100
Message-ID: <4308BAD6.1070301@hp.com>
To: Bruce D'Arcus <bdarcus@gmail.com>
Cc: public-rdf-dawg-comments@w3.org, Richard Newman <rich@holygoat.co.uk>, Danny Ayers <danny.ayers@gmail.com>



Bruce D'Arcus wrote:
> Hi Andy,
> 
> On Aug 21, 2005, at 11:39 AM, Seaborne, Andy wrote:
> 
>>> FWIW, my application (currently XML/XSLT oriented) is citation 
>>> processing.  If I want a bibliography list in the form ...
>>> Doe, J. (1999a) ...
>>>  . (1999b) ...
>>> . (2000) ...
>>> .... I need to group and sort by author, then year.
>>
>>
>> Bruce - could you expand on the need for GROUP BY in this specific 
>> example? I don't see where an aggregate function is being used.
>>
>> In particular, in what way does sorting by author then by year not 
>> achieve the effect of placing entries in the order described?  SPARQL 
>> does have "ORDER BY"
> 
> 
> Because I need to count the number of results in an author-year group.  
> If there are more than one, I then need to number them (using a 
> letter).  That's why "2000" does not have a suffix, but the two 1999s do.
> 
> Likewise, I need to be able to replace the name with the three em-dashes 
> for all but the first in the author group.
> 
> So it helps to have the results sorted, but that's not enough, and it's 
> a hassle if I then need to use XSLT (particularly 1.0) to do the 
> additional processing.
> 
> I'll add that grouping is a common problem issue on the XSLT list, and 
> the new grouping support in XSLT 2.0 arguably the most useful new feature.
> 
> Bruce

Hi Bruce,

Thanks for the clarification.  There seem to be two things going on - the 
counting within groups and some transformation of the results.

	Andy
Received on Sunday, 21 August 2005 17:33:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:49 GMT