Buonasera a tutti,
Ho questa situazione
ID; Valore;
1; 4;
1; 5;
4; 4;
5; 8;
5; 2;
E vorrei ottenere in una query:
ID; Valore; Risultato;
1; 4; 9;
1; 5; 9;
4; 4; 4;
5; 8; 10;
5; 2; 10;
Consigli? Grazie anticipatamente
Buonasera a tutti,
Ho questa situazione
ID; Valore;
1; 4;
1; 5;
4; 4;
5; 8;
5; 2;
E vorrei ottenere in una query:
ID; Valore; Risultato;
1; 4; 9;
1; 5; 9;
4; 4; 4;
5; 8; 10;
5; 2; 10;
Consigli? Grazie anticipatamente
codice:select a.id,a.valore,b.totale from tabella as a left join ( select id,sum(valore) as totale from tabella group by id) as b on a.id = b.id order by a.id![]()