select uid, sum(if(submit_time is null,1,0)) incomplete_cnt, count(submit_time) complete_cnt, GROUP_CONCAT(distinct substr(start_time,1,10),':',tag separator';') from exam_record er join examination_info ei on er.exam_id = ei.exam_id where year(er.start_time)=2021 group by uid having (complete_cnt>=1 and incomplete_cnt<5) and incomplete_cnt>1 order by incomplete_cnt desc;