SELECT * FROM ( SELECT a.uid, a.exam_cnt, IFNULL(b.question_cnt, 0) question_cnt FROM ( SELECT uid, COUNT(*) exam_cnt FROM exam_record WHERE DATE_FORMAT(submit_time, '%Y') = 2021 GROUP BY uid ) a LEFT JOIN ( SELECT uid, COUNT(*) question_cnt ...