select exam_id, (count(start_time) - count(submit_time)) as incomplete_cnt, round((1- count(submit_time)/ count(start_time)), 3) as complete_rate from exam_record group by exam_id having count(start_time) != count(submit_time)1、查找有未完成的试卷。
having count(start_time) != count(submit_time)2、统计完成的数量,统计总数。计算未完成率