I have a table that looks somthing like below... I'm trying to write a single query that takes each id, sums them up, then prints them out so it looks like the table at the bottom, any advice would be great! Thanks.
id name amt
-- ---- ---
1 John 5.00
1 John 8.00
1 John 10.00
2 Bob 0.00
2 Bob 3.00
3 Joe 6.00
3 Joe 9.00
4 Dave 8.00
4 Dave 2.00
4 Dave 2.00
id name amt
-- ---- ---
1 John 23.00
2 Bob 3.00
3 Joe 15.00
4 Dave 12.00
id name amt
-- ---- ---
1 John 5.00
1 John 8.00
1 John 10.00
2 Bob 0.00
2 Bob 3.00
3 Joe 6.00
3 Joe 9.00
4 Dave 8.00
4 Dave 2.00
4 Dave 2.00
id name amt
-- ---- ---
1 John 23.00
2 Bob 3.00
3 Joe 15.00
4 Dave 12.00