mysql 版本:8.0.28
1
hidemyself 2022-09-06 11:14:20 +08:00 1
你需要 rank() over
|
2
spicecch 2022-09-06 11:31:22 +08:00 1
PARTITION BY
|
3
wxf666 2022-09-06 11:38:22 +08:00 2
https://dev.mysql.com/doc/refman/8.0/en/example-maximum-column-group-row.html
文中说了 子查询、相关子查询、自连接、窗口函数 4 种方法 |
4
hay313955795 2022-09-06 13:39:23 +08:00 1
select * from table where id in (select Max(id) from table group by xxx ) 这样
|