sql server - how to get cumulative sum - Stack Overflow
經安全檢測,此網站為安全網站,請放心前往原始網址!
sql server - how to get cumulative sum - Stack Overflow
declare @t table ( id int, SomeNumt int ) insert into @t select 1,10 union select 2
... select t1.id, t1.SomeNumt, SUM(t2.SomeNumt) as sum from @t t1 inner join @t
...