select u.university,
count(u.university)/count(DISTINCT u.device_id)as answer
from user_profile as u inner join question_practice_detail as q
on u.device_id=q.device_id
group by u.university;