SELECT
    up.university university,
    qd.difficult_level difficult_level,
    ROUND(COUNT(qpd.question_id) / COUNT(DISTINCT up.device_id), 4) avg_answer_cnt
FROM
    question_practice_detail qpd LEFT JOIN question_detail qd ON
    qpd.question_id = qd.question_id LEFT JOIN user_profile up ON
    qpd.device_id = up.device_id
GROUP BY
    up.university,
    qd.difficult_level;