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

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

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

SELECT b.tag AS tag, b.difficulty AS difficulty,

    round((SUM(a.score) - MAX(a.score) - MIN(a.score))/(count(a.exam_id)-2),1) AS clip_avg_score

FROM exam_record a

LEFT JOIN examination_info b ON a.exam_id = b.exam_id

WHERE b.tag = 'SQL' AND b.difficulty = 'hard' and a.score is not null

GROUP BY a.exam_id;

全部评论

相关推荐

我已成为0offer的糕手:别惯着,胆子都是练出来的,这里认怂了,那以后被裁应届被拖工资还敢抗争?
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务