SQL 60) 给出salary的累计和running_total
统计salary的累计和running_total
http://www.nowcoder.com/questionTerminal/58824cd644ea47d7b2b670c506a159a6
方法)SUM()OVER()
SELECT emp_no, salary, SUM(salary)over(ORDER BY emp_no) FROM salaries WHERE to_date = '9999-01-01';求累计和/汇总 语句结构:SUM( 列名 )OVER( ORDER BY 列名)
SQL 文章被收录于专栏
SQL