题解 | #得分不小于平均分的最低分#
得分不小于平均分的最低分
https://www.nowcoder.com/practice/3de23f1204694e74b7deef08922805b2
select min(er.score) as min_score_over_avg # 获取符合列最小的数 from exam_record er join examination_info ei using(exam_id) where tag = 'SQL' AND score >= ( select avg(e1.score) from exam_record e1 join examination_info e2 using(exam_id) where tag = 'SQL' ) # 选中sql类,分数大于平均分,这里的平均分用子查询获取直接使用