一定要注意审题:
通过题目个数相同,排名相同——>窗口函数dense_rank();
排名相同,按id升序排列——>order by...
select a.id, a.number, dense_rank() OVER(order by number desc) as t_rank from passing_number as a order by a.number desc, a.id asc;
一定要注意审题:
通过题目个数相同,排名相同——>窗口函数dense_rank();
排名相同,按id升序排列——>order by...
select a.id, a.number, dense_rank() OVER(order by number desc) as t_rank from passing_number as a order by a.number desc, a.id asc;