题解 | #计算男生人数以及平均GPA#
计算男生人数以及平均GPA
https://www.nowcoder.com/practice/7d9a7b2d6b4241dbb5e5066d7549ca01
select count(gender),avg(gpa) from user_profile where gender = "male";
where 条件过滤出性别为男生的记录,再count()统计该记录个数,avg()求对应字段/列的平均值
计算男生人数以及平均GPA
https://www.nowcoder.com/practice/7d9a7b2d6b4241dbb5e5066d7549ca01
select count(gender),avg(gpa) from user_profile where gender = "male";
where 条件过滤出性别为男生的记录,再count()统计该记录个数,avg()求对应字段/列的平均值
相关推荐