select   gender, university
, count(device_id) user_num
,avg(active_days_within_30) avg_active_day
,avg(question_cnt) avg_question_cnt
from user_profile
group by university, gender