SELECT up.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 qpd.device_id=up.device_id GROUP BY university 每道题最难的点就在于对题目的理解,对于SQL语句的灵活使用,多练习。看到答案时候才恍然大悟,做题时自己却没有思路。