题解 | #统计salary的累计和running_total#
统计salary的累计和running_total
http://www.nowcoder.com/practice/58824cd644ea47d7b2b670c506a159a6
SELECT emp_no, salary, sum(salary) over (order by emp_no) running_total FROM salaries where to_date='9999-01-01' ;
- 窗口函数,这里不需要分组,就不用partition by
- order by的默认就是第一行到当前行,所以不需要特意指出
rows between unbounded preceding and current row
```