select ny, dense_rank() over (partition by ny, gfbm order by zpf desc) as pm from table; select ny, rank() over (partition by ny, gfbm order by zpf desc) as pm from table; select ny, row_number() over (partition by ny, gfbm order by zpf desc) as pm from table;
上面三种方式对应排名如下: