有一个薪水表salaries简况如下:
emp_no | salary | from_date | to_date |
10001 | 88958 | 2002-06-22 | 9999-01-01 |
10002 | 72527 | 2001-08-02 | 9999-01-01 |
10003 | 43311 | 2001-12-01 | 9999-01-01 |
10004 | 72527 | 2001-12-01 | 9999-01-01 |
对所有员工的薪水按照salary降序先进行1-N的排名,如果salary相同,再按照emp_no升序排列:
emp_no | salary | t_rank |
10001 | 88958 | 1 |
10002 | 72527 | 2 |
10004 | 72527 | 2 |
10003 | 43311 | 3 |