usa GROUP BY

http://database.html.it/guide/lezion...-con-le-query/

insieme a COUNT(*)

http://database.html.it/guide/lezion...e-funzioni-ii/