更新时间:2022-12-09 19:53:02
您可以在OVER
子句中将SUM
与ORDER BY
子句一起使用:
You can use SUM
with ORDER BY
clause inside the OVER
clause:
SELECT Account, Month, Salary,
SUM(Salary) OVER (PARTITION BY Account ORDER BY Month) AS RunningTotal
FROM mytable