This is my table
create table #t(id int, amt int)
insert into #t values(1, 40), (1, 20), (1, 10), (2, 100), (2, 120), (2, 400)
I need output like this!
id amt
1 70
1 70
1 70
2 620
2 620
2 620
I tried
SELECT
id, SUM(amt)
FROM
#t
GROUP BY
id