Per recuperare i dati che ti occorrono mi sembra che basti questa
codice:select agente, extract(year_month from data_inizio) as mese, sum(prezzo) as tot_mese from adempimenti group by agente,mese
Per recuperare i dati che ti occorrono mi sembra che basti questa
codice:select agente, extract(year_month from data_inizio) as mese, sum(prezzo) as tot_mese from adempimenti group by agente,mese