Re: GROUP BY

From: V.J. Kumar <vjkmail_at_gmail.com>
Date: Sat, 19 May 2007 16:20:01 +0200 (CEST)
Message-ID: <Xns99356949CCEB8vdghher_at_194.177.96.26>


David Portas <REMOVE_BEFORE_REPLYING_dportas_at_acm.org> wrote in news:1179559007.213749.146920_at_k79g2000hse.googlegroups.com:

> There is the following exception. SQL supports the case where both 2)
> and 3) are empty but it is not quite a projection since:
>
> SELECT 1
> FROM r
> GROUP BY ();
>
> returns a single tuple even if r is empty.

What SQL would that be? Oracle SQL returns zero rows (as it is supposed to according to '92 standard), MS SQL Express does not even understand the expression and returns a syntax error.

 GROUP BY is therefore
> something like TTM's SUMMARIZE operator where in this case the BY
> argument is DEE - possibly the only place that SQL explicitly supports
> a 0-degree relation.
>
> --
> David Portas
>
>
Received on Sat May 19 2007 - 16:20:01 CEST

Original text of this message