Możesz użyć SUM
z ORDER BY
klauzula wewnątrz OVER
klauzula:
SELECT Account, Month, Salary,
SUM(Salary) OVER (PARTITION BY Account ORDER BY Month) AS RunningTotal
FROM mytable
Możesz użyć SUM
z ORDER BY
klauzula wewnątrz OVER
klauzula:
SELECT Account, Month, Salary,
SUM(Salary) OVER (PARTITION BY Account ORDER BY Month) AS RunningTotal
FROM mytable