select university,difficult_level,
round(count(q.question_id) / count(distinct u.device_id),4) 
from question_practice_detail q left join user_profile u on u.device_id = q.device_id
left join question_detail d on q.question_id = d.question_id 
group by university,difficult_level having university = '山东大学';