select gender,university, count(gender) as user_num, round(avg(active_days_within_30),1) as avg_active_day, round(avg(question_cnt),1) as avg_question_cnt from user_profile group by gender,university order by gender,university mysql8.0对于group by 子句进行了调整:不再支持隐式排序。如果还想实现排序效果,需要添加order by子句进行显示排序