select min(t3.score) min_score_over_avg from (select t1.score, avg(t1.score) over(partition by t2.tag) avg_score from exam_record t1 left join examination_info t2 on t1.exam_id = t2.exam_id where t2.tag = 'SQL' and t1.score is not null) t3 where t3.score >= t3.avg_score