select uid,exam_id,round(avg(score),0) as _score
from exam_record
where exam_id in (select exam_id from examination_info where tag like "c%")
and uid in (select uid from user_info where nick_name rlike '^[0-9]+$'or nick_name rlike '^牛客[0-9]+号$')
and score is not null
group by uid,exam_id
order by uid,avg(score)