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

Re: Query review, part 2 (ACTION-546)

From: Gregory Williams <greg@evilfunhouse.com>
Date: Tue, 13 Dec 2011 20:07:05 -0500
Cc: Andy Seaborne <andy.seaborne@epimorphics.com>, public-rdf-dawg@w3.org
Message-Id: <F6F0E9F0-4BCA-46DC-8761-A9EDE6EEC2D0@evilfunhouse.com>
To: Steve Harris <steve.harris@garlik.com>
On Dec 9, 2011, at 6:24 AM, Steve Harris wrote:

>>> ===
>>> "If the GROUP BY keyword is used, or there is implicit grouping due to the use of aggregates in the projection..."
>>> Is it possible to have an implicit grouping based on the use of aggregates in only the HAVING clause, and not the projection?
>> Yes and no.
>> Observation: if you have just "HAVING aggregate", then there is no possible legal SELECT clause.
>> Only GROUP BY variables and aggregates would be legal
>> There aren't any GROUP BY variables and you are askign about none in projection.
>> SELECT * is illegal if there is an aggregate (implicit group).
>> So I hope the answer is "yes" and it just falls out there are no legal queries.
>> @@Steve?
> Yes, I'm not sure if it's worth adding something about HAVING making grouping implicit or not.


Did you see my followup to Andy about this? I said:

It's a bit perverse, but wouldn't "SELECT (1 AS ?one)" be a valid projection for such a query?

This might be a corner case, but I think it's possible, and so should probably be mentioned (or "the use of aggregates in the projection" simply generalized by removing "in the projection").

Received on Wednesday, 14 December 2011 01:10:04 UTC

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