题解 | #0级用户高难度试卷的平均用时和平均得分#

0级用户高难度试卷的平均用时和平均得分

http://www.nowcoder.com/practice/bb474c6cbd77478fb6d9fc86934d0ebb

    1. SELECT uid , ROUND(avg(score),0) AS avg_score,
    1. ROUND(avg(yongshi),1) AS avg_time_took
    1. FROM
    1. (SELECT uid,
    1. IF(submit_time IS NULL,duration,timestampdiff(minute,start_time,submit_time)) yongshi,
    1. IF(score IS NULL,0,score) as score
    1. FROM exam_record er LEFT JOIN examination_info ei
    1. ON er.exam_id = ei.exam_id
    1. WHERE difficulty = 'hard') a
    1. WHERE uid IN (SELECT uid FROM user_info WHERE level = 0)
    1. GROUP BY uid
全部评论

相关推荐

11-02 09:49
已编辑
货拉拉_测试(实习员工)
热爱生活的仰泳鲈鱼求你们别卷了:没事楼主,有反转查看图片
点赞 评论 收藏
分享
头像
11-06 10:58
已编辑
门头沟学院 嵌入式工程师
双非25想找富婆不想打工:哦,这该死的伦敦腔,我敢打赌,你简直是个天才,如果我有offer的话,我一定用offer狠狠的打在你的脸上
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务