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

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

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

select uid,exam_id
,ifnull(round(avg(100*(score-min_score)/(max_score-min_score)),0),0) as avg_new_score
from 
(
    select *
    ,max(score) over(partition by exam_id) as max_score
    ,min(score) over(partition by exam_id) as min_score
    from exam_record
    where exam_id in 
    (
    select exam_id
    from examination_info
    where difficulty="hard"
    )
) t
group by exam_id,uid
order by exam_id,avg_new_score desc
全部评论
系统通不过
点赞 回复 分享
发布于 2021-12-06 11:48

相关推荐

06-26 10:08
门头沟学院 C++
北京Golang实习,一个月4700,吃住都不报,公司位置在海淀。请问友友怎么看呢?如果要租房的话有什么建议吗
码农索隆:租房肯定是合租了,剩下的钱,差不多够正常吃饭了,看看能不能学到东西吧
点赞 评论 收藏
分享
迷茫的大四🐶:自信一点,我认为你可以拿到50k,低于50k完全配不上你的能力,兄弟,不要被他们骗了,你可以的
点赞 评论 收藏
分享
06-26 19:47
中南大学 Java
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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