题解 | 每个学校有哪些年龄的学生

每个学校有哪些年龄的学生

https://www.nowcoder.com/practice/154f6d615062482d8a3618862f019930

select university,group_concat(distinct age order by age) age_concat from user_profile
group by university


concat_grouop 和 group by 一起用 用于拼接参数字段,可用distinct 去重,也可以在函数内用 order by 直接排序

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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