GROUP BY

I can use subqueries to select from the following table to produce the
output:

Total 2004 2005 2006
----------------------------
10 2 4 4



foobar
---------------
DATE added_date



I was told that I can use GROUP BY (I think) instead.

I only managed to do the total which is

SELECT COUNT(*)
FROM foobar;



Please advice how I can get the sub count of the years.
Thank you.
- [ Fr, 10 November 2006 09:42 ] [ ID #1530892 ]
Datenbanken » mailing.database.mysql » GROUP BY

Vorheriges Thema: Pls help me
Nächstes Thema: which storage engine should I use- MyISAM or InnoDB?