codice:select t1.gruppo,t1.utente,sum(t1.items) as tot_utente,t2.tot_gruppo from tabella as t1 left join ( select gruppo,sum(items) as tot_gruppo from tabella group by gruppo) as t2 on t1.gruppo = t2.gruppo group by t1.gruppo,t1.utente
codice:select t1.gruppo,t1.utente,sum(t1.items) as tot_utente,t2.tot_gruppo from tabella as t1 left join ( select gruppo,sum(items) as tot_gruppo from tabella group by gruppo) as t2 on t1.gruppo = t2.gruppo group by t1.gruppo,t1.utente