Du kan använda SUM
med ORDER BY
sats i OVER
klausul:
SELECT Account, Month, Salary,
SUM(Salary) OVER (PARTITION BY Account ORDER BY Month) AS RunningTotal
FROM mytable
Du kan använda SUM
med ORDER BY
sats i OVER
klausul:
SELECT Account, Month, Salary,
SUM(Salary) OVER (PARTITION BY Account ORDER BY Month) AS RunningTotal
FROM mytable