使用dense_rank over排名即可

select emp_no, salary, dense_rank() over (order by salary DESC) as t_rank
from salaries;