Select gender,university,
count(device_id) as user_num,
avg(active_days_within_30) as avg_active_days,
avg(question_cnt) as avg_question_cnt
from user_profile
group by gender,university

count(device_id)这一点没有想到,group by可以单独使用,我一直试图在where后面添加group by,所以一直失败。这道题挺难的