题解 | #删除记录(二)#
删除记录(二)
http://www.nowcoder.com/practice/964c9f7fffbb4ab18b507cfed4111b4a
delete from exam_record where id in ( select t.id from ( select *,ROW_NUMBER()over(order by start_time) as m from exam_record where TIMESTAMPDIFF(minute,start_time,submit_time)<5 &nbs***bsp; submit_time is null ) as t where t.m<=3 ) 复杂的方法,窗口函数加WHERE筛选条件