题解 | #分组排序练习题#
分组排序练习题
http://www.nowcoder.com/practice/e00bbac732cb4b6bbc62a52b930cb15e
SELECT university,AVG(question_cnt) FROM user_profile GROUP by university ORDER BY AVG(question_cnt) ASC;
按照平均发帖升序。或者下面这样写法好点
SELECT university,AVG(question_cnt) avg_question_cnt FROM user_profile GROUP by university ORDER BY avg_question_cnt ASC;