delete from exam_record
where id in(
select id
from (
select *,row_number()over(order by start_time)  as rn
from exam_record
where submit_time is null&nbs***bsp;timestampdiff(minute,start_time,submit_time) < 5
) t where rn <= 3
    )