|
Posted by Christoph Burschka on 11/25/06 09:51
Justin wrote:
> example: SELECT * FROM abc WHERE name='abc' GROUP BY age
>
> jatrojoomla wrote:
>> I am trying to use GROUP BY cluse, what is the utility of this cluse in
>> MySQL
>> plz. any body tell me
>
That isn't really useful, however.
A real application would be, for example, "SELECT age FROM abc GROUP BY age",
which does the same job as "SELECT DISTINCT age ...", selecting only those ages
that are different.
Or "SELECT age,count(*) FROM abc GROUP BY age", which will count the records for
each value of age.
--
CB
[Back to original message]
|