题解 | #得分不小于平均分的最低分#

得分不小于平均分的最低分

http://www.nowcoder.com/practice/3de23f1204694e74b7deef08922805b2

SELECT
  MIN(er.score) min_score_over_avg
FROM
  exam_record er
  INNER JOIN examination_info ei ON er.exam_id = ei.exam_id
WHERE
  ei.tag = 'SQL'
  AND er.score >= (
    SELECT
      AVG(er.score)
    FROM
      exam_record er
      INNER JOIN examination_info ei ON er.exam_id = ei.exam_id
    WHERE
      tag = 'SQL'
  );

全部评论

相关推荐

09-30 11:52
门头沟学院 Java
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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