with table1 as ( select uid , date_format(start_time,'%Y%m') as time, submit_time, dense_rank() over(partition by uid order by date_format(start_time,'%Y%m') desc) as time_rank from exam_record ), table2 as ( select uid , sum(if(time is not null , 1 , 0)) as exam_all_cnt...