一,看原表
select * from `user`;
二,查询同组年级最大的
select
username
,SUBSTRING_INDEX( GROUP_CONCAT(age order by age desc) ,',',1) uuid
from
(
select uuid
,username
,`password`
,age
from `user`
)b
GROUP BY uuid asc;
2022-10-11 11:00:36
一,看原表
select * from `user`;
二,查询同组年级最大的
select
username
,SUBSTRING_INDEX( GROUP_CONCAT(age order by age desc) ,',',1) uuid
from
(
select uuid
,username
,`password`
,age
from `user`
)b
GROUP BY uuid asc;
下一篇:JSX设置CSS样式详解