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

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

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

with a as     
    (select ei.tag, ei.difficulty,er.score
    from exam_record er 
    inner join examination_info ei on ei.exam_id =er.exam_id 
    where ei.tag='SQL'
        and er.score is not null and ei.difficulty='hard')

select tag,difficulty,round(avg(score),1) clip_avg_score from a 
where a.score<> (select max(score) from a) 
and a.score<> (select min(score) from a)
group by 1,2

全部评论

相关推荐

01-04 21:30
已编辑
河南工业大学 Java
27届学院本誓死冲击...:下次再发把个人信息隐藏掉,以防有心之人。相关课程删了,荣誉奖项只留蓝桥杯,把蓝桥杯写到教育经历里,按教育经历、实习经历、项目经历、专业技能这个顺序排版
点赞 评论 收藏
分享
后端转测开第一人:wlb不好吗 非得卷
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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