with 月业绩
as (SELECT 年份,月份, ROUND(sum(总业绩)/100000) 业绩 FROM `myj` group by 年份,月份)
select * ,
ROW_NUMBER() over(PARTITION by 年份 order by 业绩 desc) 'row_N', #行号
RANK() over(PARTITION by 年份 order by 业绩 desc) 'rank' ,#顺序跳过
DENSE_RANK() over(PARTITION by 年份 order by 业绩 desc) 'de_rk' #顺序不跳过
from 月业绩