select uid,start_month,total_cnt,complete_cnt from (select uid, date_format(start_time,'%Y%m') as start_month, rank() over (partition by uid order by date_format(start_time,'%Y%m') desc) as ranking, count(start_time) as total_cnt, count(submit_time) as complete_cnt from exam_record group by uid,date...