select u.university, count(question_id) / count(distinct q.device_id) as "avg_answer_cnt" from user_profile u left join question_practice_detail q on u.device_id = q.device_id group by university having avg_answer_cnt is not null;
select u.university, count(question_id) / count(distinct q.device_id) as "avg_answer_cnt" from user_profile u left join question_practice_detail q on u.device_id = q.device_id group by university having avg_answer_cnt is not null;