Re: Why using "Group By"

From: Bob Badour <bbadour_at_golden.net>
Date: Sat, 15 Mar 2003 10:54:49 -0500
Message-ID: <tvIca.88$Ek6.10425394_at_mantis.golden.net>


"stu" <smcgouga_at_nospam.co.uk> wrote in message news:b4pole$o2t$1$8300dec7_at_news.demon.co.uk...
> "oferbu" <junkbu_at_hotmail.com> wrote in message
> news:b9b409f2.0303130207.42f8ab91_at_posting.google.com...
> > Hello All,
> >
> > This is a theoretical question. Why do I need to add the "Group By" in
> > the following SQL:
> >
> > SELECT
> > CUSTOMER_CITY, COUNT(*)
> > FROM
> > CUSTOMER_TABLE
>
> What happens when you actually want
> > SELECT
> > CUSTOMER_CITY, COUNT(*)
> > FROM
> > CUSTOMER_TABLE
>
> do you say dont group by...?
>
> I think it is best to be as explicit as possible.

How should the result of this query differ from the same version with GROUP BY? I vote for an error. Received on Sat Mar 15 2003 - 16:54:49 CET

Original text of this message