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

Re: ISSUE-35: DISTINCT/aggregates

From: Andy Seaborne <andy.seaborne@talis.com>
Date: Wed, 03 Feb 2010 15:22:55 +0000
Message-ID: <4B6994CF.6080407@talis.com>
To: Steve Harris <steve.harris@garlik.com>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>


On 03/02/2010 3:11 PM, Steve Harris wrote:
> On 3 Feb 2010, at 14:09, Andy Seaborne wrote:
>> On 03/02/2010 12:15 PM, Steve Harris wrote:
>>> On 3 Feb 2010, at 08:42, Andy Seaborne wrote:
>>> ...
>>>> ISSUE-35
>>>> Can aggregate functions take DISTINCT as an argument a la SELECT
>>>> COUNT(DISTINCT ?X)?
>>>>
>>>> DONE All built-in aggregates can take the word DISTINCT.
>>>> Custom ones do not; it's part of their definition,
>>>> i.e. different URIs for a DISTINCT and non DISTINCT form.
>>>
>>> I thought that the custom ones could also take DISTINCT? My recollection
>>> may well be wrong though. Do you have a link to the strawpoll?
>>
>> By using a keyword argument, it undermines the idea that the URI
>> identifies one thing - it's really now two, the DISTINCT and
>> non-DISTINCT versions.
>>
>> I'd expect COUNT(*) and COUNT(DISTINCT *) to have different URIs.
>
> Ah, interesting, I wouldn't.
>
> E.g. GROUP_CONCAT(DISTINCT ?x ORDER BY STRLEN(?x)) wouldn't have a
> different URI to GROUP_CONCAT(DISTINCT ?x) either.

Err - that's not SPARQL . The ORDER BY would have to be a subquery 
although now we're in ISSUE-6 territory (SubSelects in places other than 
graph patterns).

Are you proposing it?

	Andy

>
> In my mind the DISTINCT is part of the expression, not part of the
> function.
>
> - Steve
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit
> http://www.messagelabs.com/email______________________________________________________________________
>
Received on Wednesday, 3 February 2010 15:23:02 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:41 GMT