select gender,
university,
count(gender) user_num,//性别计数
avg(active_days_within_30) avg_active_days,//平均
avg(question_cnt) avg_question_cnt//平均
    from user_profile
    group by gender,university//每个学校,每种性别