题解 | #删除记录(二)#

删除记录(二)

https://www.nowcoder.com/practice/964c9f7fffbb4ab18b507cfed4111b4a

delete from exam_record
where submit_time is null or timestampdiff(minute,start_time,submit_time)<5 
order by start_time limit 3

问题分解:

1. 未完成作答,即subtmit_time is null, 作答时间小于5分钟整,即:timestampdiff(minute,start_time,submit_time) <5

2. 开始作答时间最早的3条记录,取前三条,按start_time排序,order by start_time limit 3

3. 删除语句delete from exam_record where...

全部评论

相关推荐

点赞 评论 收藏
分享
06-11 13:34
门头沟学院 C++
offe从四面八方来:我真的没时间陪你闹了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务