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

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

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

select difficult_level,
        # count(question_id) as all_question,
        sum(case when result='right' then 1 else 0 end)/count(question_id) as correct_rate
from (
select qd.difficult_level,
        pd.question_id,
        pd.result
from user_profile up
left join question_practice_detail pd on pd.device_id=up.device_id
left join question_detail qd on qd.question_id=pd.question_id
where up.university='浙江大学'
) t
where difficult_level is not null
group by difficult_level
order by correct_rate asc

还得把difficult_level为空的给过滤掉,老方法了,在项目导数的时候,如果说有重复的数据,我就直接加distinct去重,有啥问题解决问题,以问题为导向型编程

全部评论

相关推荐

2025-12-30 16:42
同济大学 C++
仁狂躁使者:哎呀,不用担心,我当时配环境配了两天,项目捋不清就问问导师能不能用ai,慢慢就清了,会好起来的
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务