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

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

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

select min(score)
  from (select t1.*,
               t2.*,
               case when score > avg(score) over(partition by tag) then 1 else 0 end flag
          from sql125_exam_record t1, sql125_examination_info t2
         where t1.exam_id = t2.exam_id)
 where flag = 1

全部评论

相关推荐

程序员小假:人才
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务