题解 | #最差是第几名(一)#
最差是第几名(一)
http://www.nowcoder.com/practice/ae5e8273e73b4413823b676081bd355c
问题是经典的累积求和,用sum(number) over(order by grade) 即可得出。
SELECT grade , SUM(number) OVER(ORDER BY grade) t_rank FROM class_grade
最差是第几名(一)
http://www.nowcoder.com/practice/ae5e8273e73b4413823b676081bd355c
问题是经典的累积求和,用sum(number) over(order by grade) 即可得出。
SELECT grade , SUM(number) OVER(ORDER BY grade) t_rank FROM class_grade
相关推荐