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

计算男生人数以及平均GPA

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

select 
 count(case when gender='male' then gender else null end) as male_num,
 round(avg(case when gender='male' then gpa else null end),1) as avg_gpa
from user_profile

全部评论

相关推荐

ResourceUtilization:四六级不愧是大学最有用的证之一
点赞 评论 收藏
分享
03-28 19:11
铜陵学院 C++
有礼貌的山羊追赶太阳:太典了,连笔试都没有开始就因为HC满了而结束了,而且还卡你不让你再投其他部门的。
点赞 评论 收藏
分享
05-16 09:20
已编辑
中国民航大学 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务