select uid,start_month,total_cnt,complete_cnt from (select uid, date_format(start_time,'%Y%m') start_month, count(start_time) total_cnt, count(submit_time) complete_cnt, dense_rank() over (partition by uid order by date_format(start_time,'%Y%m') desc) t_rank from exam_record where uid in (sele...