mysql 版本:8.0.28
mysql 版本:8.0.28
|
1
你需要 rank() over
|
|
2
PARTITION BY
|
|
3
https://dev.mysql.com/doc/refman/8.0/en/example-maximum-column-group-row.html
文中说了 子查询、相关子查询、自连接、窗口函数 4 种方法 |
|
4
select * from table where id in (select Max(id) from table group by xxx ) 这样
|