题解 | #对试卷得分做min-max归一化#

对试卷得分做min-max归一化

https://www.nowcoder.com/practice/2b7acdc7d1b9435bac377c1dcb3085d6

select
t.uid,
t.exam_id,
round(avg(if(ma=mi,t.score,(t.score-mi)/(ma-mi)*100)))avg_new_score
from (
select
er.uid,
er.exam_id,
er.score,
min(score) over(partition by exam_id) as mi,
max(score) over(partition by exam_id) as ma
from examination_info ei
inner join exam_record er
on ei.exam_id=er.exam_id
where ei.difficulty='hard'
and er.score is not null) t
group by t.uid, t.exam_id
order by exam_id,avg_new_score desc ;

全部评论

相关推荐

抱抱碍事梨a:三点建议,第一点是建议再做一个项目,把自我介绍部分顶了,第二点是中南大学加黑加粗,第三点是建议加v详细交流
点赞 评论 收藏
分享
后来123321:别着急,我学院本大二,投了1100份,两个面试,其中一个还是我去线下招聘会投的简历,有时候这东西也得看运气
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务