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

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

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

  • 试卷表和考试记录表内连接
  • 内连接还可以写作:join examination_info using(exam_id);
SELECT tag, difficulty,
    round((sum(er.score) - max(er.score) - min(er.score)) / (count(er.score)-2), 1) as clip_avg_score
FROM examination_info ei 
JOIN exam_record er ON ei.exam_id = er.exam_id
WHERE tag ="SQL" and difficulty = "hard";

全部评论

相关推荐

02-28 01:18
已编辑
南昌大学 后端工程师
黑皮白袜臭脚体育生:把开源经历放个人项目上边应该更好,就像大部分人都把实习经历放个人项目上边
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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