group by

codice:
select campo, count(*) as tot
from tabella
group by campo
order by tot