题解 | #第二快/慢用时之差大于试卷时长一半的试卷#

第二快/慢用时之差大于试卷时长一半的试卷

https://www.nowcoder.com/practice/b1e2864271c14b63b0df9fc08b559166

select exam_id,duration,release_time
from (
    select er.exam_id,duration,release_time,submit_time,start_time,
    (row_number() over (partition by er.exam_id order by timestampdiff(minute,submit_time,start_time) desc)) as ranking_slow,
    (row_number() over (partition by er.exam_id order by timestampdiff(minute,submit_time,start_time))) as ranking_fast
    from examination_info as ei,exam_record as er
    where er.exam_id=ei.exam_id and submit_time is not null
) as r
where (case when r.ranking_slow=2 then timestampdiff(minute,submit_time,start_time) else 0 end - 
    case when r.ranking_fast=2 then timestampdiff(minute,submit_time,start_time) else 0 end)>0.5*duration 
order by exam_id desc;

全部评论

相关推荐

沐芷凌曦:这简历数分别指望了,数分最基本的SQL能力你的经历是完全没办法佐证的,而且简历排版极其混乱。你的奖项为什么要写具体的项目内容;教育经历为什么要写你在什么课学到了什么东西,这些都应该是在专业技能里的;专业技能里你又把项目的内容放了进来,而且专业技能你又在强调ETL,如果说你确定要把ETL作为你专业技能的主体那你的经历为什么不能重点佐证呢;反而项目经历你项目等于你调用PyEcharts做了一个看板,就是最基本的课程设计,也是没办法佐证你对PyEcharts的掌握程度,而且没有说具体用什么技术做了什么东西中间做了什么最终得到了什么结果。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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