#对所有员工的薪水按照salary降序进行1-N的排名#
对所有员工的薪水按照salary降序进行1-N的排名
https://www.nowcoder.com/practice/b9068bfe5df74276bd015b9729eec4bf
SELECT emp_no,salary,DENSE_RANK()OVER(order by salary desc) t_rank FROM salaries ORDER BY salary desc,emp_no
对所有员工的薪水按照salary降序进行1-N的排名
https://www.nowcoder.com/practice/b9068bfe5df74276bd015b9729eec4bf
SELECT emp_no,salary,DENSE_RANK()OVER(order by salary desc) t_rank FROM salaries ORDER BY salary desc,emp_no
相关推荐