SELECT Val, SUM(Val) OVER (Partition BY [YourPartitionValue] Order BY [OrderColumn] as CumulativeSum FROM [Table]
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)