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

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

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

# 牛客的运营同学想要查看大家在SQL类别中高难度试卷的得分情况。
# 请你帮她从exam_record数据表中计算所有用户完成SQL类别高难度试卷得分的截断平均值
select t2.tag,t2.difficulty
,round((sum(t1.score)-max(t1.score)-min(t1.score))/(count(distinct t1.id)-2),1)  as clip_avg_score
from exam_record t1
left join examination_info t2
on t1.exam_id = t2.exam_id
where t2.tag = 'SQL'
and t2.difficulty = 'hard'
and t1.score is not null
group by t2.tag,t2.difficulty
全部评论

相关推荐

12-27 22:21
门头沟学院 Java
点赞 评论 收藏
分享
程序员花海:实习和校招简历正确格式应该是教育背景+实习+项目经历+个人评价 其中项目经历注意要体现业务 实习经历里面的业务更是要自圆其说 简历模板尽可能保持干净整洁 不要太花哨的
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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