题解 | 对所有员工的薪水按照salary降序进行1-N的排名

对所有员工的薪水按照salary降序进行1-N的排名

https://www.nowcoder.com/practice/b9068bfe5df74276bd015b9729eec4bf

select
    emp_no,
    salary,
    dense_rank() over(order by salary desc) as t_rank
from salaries
order by t_rank asc, emp_no asc

全部评论

相关推荐

昨天 18:37
门头沟学院 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务