稍微简洁一点

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

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

select
    min(score) min_score_over_avg
from
    exam_record e
where
    score >= (
        select
            avg(e1.score)
        from
            exam_record e1
            inner join examination_info e2 on e1.exam_id = e2.exam_id
          and  e2.tag = 'SQL'
    )
    and exists(
        select * from examination_info where tag='SQL' and exam_id=e.exam_id
    )

全部评论

相关推荐

不愿透露姓名的神秘牛友
07-10 15:58
投个小米提前批试试水,先投一个岗位看看形势,不行就再沉淀一下投第二个岗位,莫辜负
Java抽象带篮子:我嘞个骚刚,已经开始研发6g了吗
投递小米集团等公司7个岗位
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-09 12:30
点赞 评论 收藏
分享
码农索隆:力扣的题目还挺贴近现实
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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