题解 | #统计每个学校各难度的用户平均刷题数#
统计每个学校各难度的用户平均刷题数
https://www.nowcoder.com/practice/5400df085a034f88b2e17941ab338ee8
select a.university ,difficult_level ,count(b.device_id) / count(distinct b.device_id) as avg_answer_cnt from user_profile as a, question_practice_detail as b, question_detail as c where a.device_id = b.device_id and b.question_id = c.question_id group by a.university ,difficult_level