select t0.uid,exam_cnt,ifnull(question_cnt,0) from ( select user_info.uid as uid,avg(score) from exam_record join examination_info using(exam_id) join user_info using(uid) where user_info.level=7 and difficulty='hard' and tag='SQL' group by user_info.uid having avg(score)&g...