题解 | #浙大不同难度题目的正确率#

浙大不同难度题目的正确率

https://www.nowcoder.com/practice/d8a4f7b1ded04948b5435a45f03ead8c

select
    d.difficult_level,
    sum(if (c.result = "right", 1, 0)) / count(c.device_id) as correct_rate
	# avg(if (c.result = "right", 1, 0)) as correct_rate
from
    (
        select
            a.*
        from
            question_practice_detail a
            left join user_profile b on a.device_id = b.device_id
        where
            b.university = "浙江大学"
    ) as c
    left join question_detail as d on c.question_id = d.question_id
group by
    d.difficult_level
order by
    correct_rate

全部评论

相关推荐

牛客717484937号:双飞硕没实习挺要命的
点赞 评论 收藏
分享
牛客101244697号:这个衣服和发型不去投偶像练习生?
点赞 评论 收藏
分享
评论
1
收藏
分享
牛客网
牛客企业服务