Re: Why using "Group By"
Date: Thu, 13 Mar 2003 12:18:14 -0800
Message-ID: <RN5ca.15$wV5.160_at_news.oracle.com>
"Bob Badour" <bbadour_at_golden.net> wrote in message
news:jC5ca.63$hO2.8318076_at_mantis.golden.net...
> On a system that requires logical identity, the same query would simply
I'm not suggesting that
select max(sum(sal)) from emp
is more consistent notation than
select max(ssal) from
It is just takes less keystrokes.
If the goal is the consistent GBY notation, it would require rewriting
select sum(sal) from emp
as
select sum(sal) from emp
or more realistically
select sum(sal) from emp
The latter can be transformed into a NULL bait
select sum(sal) from emp
be:
>
> select max(ssal) from ( select deptno, sum(sal) as ssal from emp )
group by dept
( select deptno, sum(sal) as ssal from emp /*implicit GBY*/)
group by {}
group by 1
group by NULL
(it actually runs on oracle;-)
You can find confusing notation everywhere, including math. If mathematicians struggle to develop consistent notation, what would you expect from SQL folks? Received on Thu Mar 13 2003 - 21:18:14 CET