mysql实现 row_number() over(partition by group_id order by id desc) rn (rn 等同下面代码的rankNum)
```
select
a.id,
a.group_id,
count(1) as rankNum
from ds_group_task a
join ds_group_task b
on a.group_id = b.group_id and a.id <= b.id
group by
a.id,
a.group_id
order by a.id
```
mysql实现 row_number() over(partition by group_id order by id desc) rn (rn 等同下面代码的rankNum)
最新推荐文章于 2022-11-20 11:28:24 发布