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

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

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

select
  ei.tag,
  ei.difficulty,
  round(
    (sum(er.score) - min(er.score) - max(er.score)) / (count(*) - 2),
    1
  )
from
  exam_record er
  inner join examination_info ei on er.exam_id = ei.exam_id
where
  ei.difficulty = "hard"
  and ei.tag = "SQL"
  and er.score is not null
group by
  ei.tag,
  ei.difficulty
全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务