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

Re: HAVING vs. FILTER

From: Steve Harris <steve.harris@garlik.com>
Date: Fri, 13 Nov 2009 15:53:41 +0000
Cc: Axel Polleres <axel.polleres@deri.org>, Lee Feigenbaum <lee@thefigtrees.net>, RDF Data Access Working Group <public-rdf-dawg@w3.org>
Message-Id: <A674B159-E858-4E27-8303-BF4182986D6C@garlik.com>
To: Andy Seaborne <andy.seaborne@talis.com>
On 13 Nov 2009, at 11:53, Andy Seaborne wrote:
> On 13/11/2009 07:18, Axel Polleres wrote:
>> One concern raised was IIRC why we need both if HAVING is anyway  
>> redundant by:
>>
>> SELECT AGG(?X)
>> WHERE P
>> GROUP BY G
>> HAVING R
>>
>>  being equivalent to
>>
>> { SELECT AGG(?X)
>> WHERE P
>> GROUP BY G }
>> FILTER R
>
> Can R be (count(*)>0) ?

That's a good point, but the {}s aren't strictly necessary:

SELECT AGG(?X)
WHERE P
GROUP BY G
FILTER R

is still unambiguous, as a scalar FILTER would be illegal there, but  
it makes me much less keen on using one keyword.

Consider that a +0.5 to HAVING, -0.5 to FILTER. I still don't care  
that much :)

- Steve

-- 
Steve Harris, CTO, Garlik Limited
2 Sheen Road, Richmond, TW9 1AE, UK
+44(0)20 8973 2465  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 Friday, 13 November 2009 15:54:20 GMT

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