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