# Re: Why using "Group By"

Date: Thu, 13 Mar 2003 16:02:59 -0500

Message-ID: <QP6ca.70$UR2.8484968_at_mantis.golden.net>

"Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message
news: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
**> be:
**> >
**> > select max(ssal) from ( select deptno, sum(sal) as ssal from emp )
**>
**> I'm not suggesting that
**>
**> select max(sum(sal)) from emp
**> group by dept
**>
**> is more consistent notation than
**>
**> select max(ssal) from
**> ( select deptno, sum(sal) as ssal from emp /*implicit GBY*/)
**>
**> 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
**> group by {}
**>
**> or more realistically
**>
**> select sum(sal) from emp
**> group by 1
**>
**> The latter can be transformed into a NULL bait
**>
**> select sum(sal) from emp
**> 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?
*

From what I have seen from them over the years, I expect them to screw things up royally. They haven't disappointed me yet. Received on Thu Mar 13 2003 - 22:02:59 CET