SELECT
    up.university university,
    qd.difficult_level difficult_level,
    ROUND(COUNT(qpd.question_id) / COUNT(DISTINCT up.device_id), 4) avg_answer_cnt
FROM
    user_profile up,
    question_practice_detail qpd,
    question_detail qd
WHERE
    up.university = '山东大学'AND
    up.device_id = qpd.device_id AND
    qpd.question_id = qd.question_id
GROUP BY
    qd.difficult_level;