34,873
社区成员
发帖
与我相关
我的任务
分享
select sno,max(sage) max
from student
group by sdept
select sno,max(sage) maxage
from student
where sage in (select max(sage)
from student
group by sdept
)
group by sno
select a.* from student a where sage = (select max(sage) from student where sdept = a.sdept)