题解 | #SQL类别高难度试卷得分的截断平均值#

SQL类别高难度试卷得分的截断平均值

http://www.nowcoder.com/practice/a690f76a718242fd80757115d305be45

select tb1.tag ,tb1.difficulty ,round(avg(tb1.score),1) from( select er.score ,ei.tag ,ei.difficulty ,row_number() over(order by er.score desc) r1 ,row_number() over(order by er.score asc) r2 from exam_record er left join examination_info ei on er.exam_id = ei.exam_id where ei.tag = "SQL" and ei.difficulty = "hard" and er.score is not null ) tb1 where tb1.r1<> 1 and tb1.r2 <> 1;

全部评论

相关推荐

拒绝无效加班的小师弟很中意你:求职意向没有,年龄、课程冗余信息可以删掉,需要提升项目经历。排版需要修改。
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务