题解 | #每个年龄的学生在各学校最大数量#

每个年龄的学生在各学校最大数量

https://www.nowcoder.com/practice/8a2a416d26144c93b67e26581764d8ab



select age,max(cnt) as max_cnt from
(select age,university,count(id) as cnt
from user_profile
group by age,university) as tmp
group by age
order by max_cnt desc

#MySQL#
全部评论
需要展示学校名称该怎么写呢
点赞 回复 分享
发布于 2023-06-02 17:48 上海
报错了
点赞 回复 分享
发布于 2022-09-28 09:43 广东

相关推荐

09-19 13:59
门头沟学院 Java
用微笑面对困难:Trae一下,如果真成了,他用了直接发字节起诉代码版权,,这个代码不商用是没问题的如果没成也是情理之中的。
点赞 评论 收藏
分享
评论
4
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务