| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: GROUP BY
Vadim Tropashko wrote:
> On May 19, 12:16 am, David Portas
> <REMOVE_BEFORE_REPLYING_dpor..._at_acm.org> wrote:
>
>>>In that case, GROUP BY is equivalent to PROJECT! >> >>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. 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.
I disagree. Grouped aggregates are simply different from ungrouped aggregates. Grouping by zero columns should be empty if r is empty.
This doesn't contradict group-by being a projection, as
> projection. Then, perhaps a projection to empty set of columns should
> be defined to always return a relation with one tuple and no
> attributes?
Hell no! Received on Sat May 19 2007 - 14:23:19 CDT
![]() |
![]() |