codice:
select date_format(campo_datetime,"%Y-%m") as mese_anno,sum(prezzo) as totale
from tabella
group by mese_anno