select
difficult_level,
//正确率:正确数/总题数
sum(if(qpd.result = 'right', 1, 0)) / count(qpd.question_id) as correct_rate
from
question_practice_detail qpd
inner join question_detail qd on qd.question_id = qpd.question_id
inner join user_profile up on up.device_id = qpd.device_id
where
up.university = '浙江大学'
group by
difficult_level //不同难度
order by
correct_rate asc; //正确率升序排列