select university ,avg(answer_cnt) avg_answer_cnt from user_profile as u , (select device_id , count(result) as answer_cnt from question_practice_detail group by device_id) as q where u.device_id = q.device_id group by university order by university;