| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Why using "Group By"
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
Isn't it clear that I want to get the number of rows per city, so why
is it necessary to add:
GROUP BY
CUSTOMER_CITY
I mean to say that those added lines didn't give more information, and
any resonable person (or a good sql parser...) could have understand
what I really want at the first sql.
Regards
Ofer Buhnik
Received on Thu Mar 13 2003 - 04:07:14 CST
![]() |
![]() |