题解 | 统计每个学校的答过题的用户的平均答题数
select university, count(question_id)/count(distinct qpd.device_id) as avg_answer_cnt from user_profile as up inner join question_practice_detail as qpd on up.device_id = qpd.device_id group by university
select university, count(question_id)/count(distinct qpd.device_id) as avg_answer_cnt from user_profile as up inner join question_practice_detail as qpd on up.device_id = qpd.device_id group by university
相关推荐