题解 | #每个年龄的学生在各学校最大数量#
每个年龄的学生在各学校最大数量
https://www.nowcoder.com/practice/8a2a416d26144c93b67e26581764d8ab
#select age,count(university) count from user_profile group by age,university;
select a.age,max(a.count) max_cnt
from
(select age,count(university) count from user_profile group by age,university)a
group by a.age order by max_cnt desc;
select a.age,max(a.count) max_cnt
from
(select age,count(university) count from user_profile group by age,university)a
group by a.age order by max_cnt desc;