题解 | #计算男生人数以及平均GPA#
计算男生人数以及平均GPA
https://www.nowcoder.com/practice/7d9a7b2d6b4241dbb5e5066d7549ca01
select count(*),avg(gpa) from user_profile where gender = 'male'
之所以用count(*)是因为count(*)不用做非空校验,效率高于count(gender)
计算男生人数以及平均GPA
https://www.nowcoder.com/practice/7d9a7b2d6b4241dbb5e5066d7549ca01
select count(*),avg(gpa) from user_profile where gender = 'male'
之所以用count(*)是因为count(*)不用做非空校验,效率高于count(gender)
相关推荐