题解 | #计算男生人数以及平均GPA#

计算男生人数以及平均GPA

http://www.nowcoder.com/practice/7d9a7b2d6b4241dbb5e5066d7549ca01

使用分组,然后对分组值进行过滤,having 等同于where,where使用于现有值进行过滤,having 使用于对未在表中出现的值(分组)进行过滤 select count(gender),avg(gpa) from user_profile group by gender having gender="male

全部评论

相关推荐

不愿透露姓名的神秘牛友
昨天 15:58
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-09 11:15
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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