题解 | #浙大不同难度题目的正确率#
浙大不同难度题目的正确率
https://www.nowcoder.com/practice/d8a4f7b1ded04948b5435a45f03ead8c
select difficult_level ,
sum(if(qpd.result='right',1,0))/count(qpd.question_id) as correct_rate //正确率:正确数/总数
from
question_practice_detail qpd
left join question_detail qd on qd.question_id=qpd.question_id
left join user_profile up on up.device_id=qpd.device_id
where
up.university='浙江大学' //需求是浙江大学
group by
difficult_level //按难度分组
order by
correct_rate; //正确率升序排序,asc可以省略

查看7道真题和解析