题解 | #分组排序练习题#
分组排序练习题
http://www.nowcoder.com/practice/e00bbac732cb4b6bbc62a52b930cb15e
SELECT
university,
AVG(question_cnt)
from user_profile
group by university
order by avg(question_cnt)
题目 要求求出每个大学的发帖的平均值,所以,我们先用group by 分组大学,然后,求出发帖平均值avg(question_cnt) 在利用order by 进行排序即可