SUM
を使用できます ORDER BY
を使用 OVER
内の句 条項:
SELECT Account, Month, Salary,
SUM(Salary) OVER (PARTITION BY Account ORDER BY Month) AS RunningTotal
FROM mytable
SUM
を使用できます ORDER BY
を使用 OVER
内の句 条項:
SELECT Account, Month, Salary,
SUM(Salary) OVER (PARTITION BY Account ORDER BY Month) AS RunningTotal
FROM mytable