codice:
select from_unixtime(campo_data,"%Y-%m") as anno_mese,count(id) as quanti
from tabella
group by from_unixtime(campo_data,"%Y-%m")