Rifacendomi all'esempio di ieri
codice:select code, sum(case when tipo_op = 'interno' then real_con_cost else 0 end) as tot_mi, sum(case when tipo_op = 'esterno' then real_con_cost else 0 end) as tot_me from export_costi_utente where .... group by code with rollup

Rispondi quotando