窗口函数简单排名
select 
工号,工资,部门编号,
dense_rank()over(partition by 部门编号 order by 工资 desc) as "排名"
from 雇员表