得分分为两部分计算:不小于平均分的分数取数A后,再取A中的最小值
嵌套函数 join

select MIN(e.score) min_score_over_avg
from exam_record e
JOIN examination_info i
using(exam_id)
WHERE i.tag = "SQL"
AND score >= (select avg(e1.score)
from exam_record e1 
join examination_info e2
using(exam_id)
where tag = "SQL")