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

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

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

select
    uid,
    er.exam_id as exam_id,
    if(maxi=mini,round(avg(score)),round(avg(score-mini)/(maxi-mini)*100)) as avg_new_score
from (
	select
		exam_id,
		max(score) as maxi,
		min(score) as mini
	from exam_record
	where exam_id in (select exam_id from examination_info where difficulty='hard') and score is not null
	group by exam_id
)m ,exam_record er
where m.exam_id=er.exam_id and score is not null
group by uid,exam_id
order by exam_id,avg_new_score desc
全部评论
m ,exam_record er 是什么意思
点赞 回复 分享
发布于 2023-03-03 21:35 浙江

相关推荐

想run的马里奥在学...:这个学历帮你扫平百分之80的障碍,投就完了,这会找不到就等3月暑期一样能找到
点赞 评论 收藏
分享
评论
5
收藏
分享

创作者周榜

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