select *
from (select t.*,row_number() over(partition by t.game_desc order by periods_no DESC) rn
from 表名 t
)
where rn<=5
partition by 类型名 (根据类型分组)
row_number() over 排序
select *
from (select t.*,row_number() over(partition by t.game_desc order by periods_no DESC) rn
from 表名 t
)
where rn<=5
partition by 类型名 (根据类型分组)
row_number() over 排序