题解 | #统计有未完成状态的试卷的未完成数和未完成率#

统计有未完成状态的试卷的未完成数和未完成率

http://www.nowcoder.com/practice/69fc2b1df4144c0991e4b8280d8aba27

# 这里其实可以有很多不同的方法, 比如sum(case when submit_time is null then 1 else 0)
# sum(if(submit_time is null, 1, 0)) 都可以. 有没有大佬知道这些方法哪个效率更高?
select exam_id,
    count(start_time) - count(submit_time),
    round((count(start_time) - count(submit_time)) / count(1), 3)
from exam_record
group by exam_id
having count(start_time) - count(submit_time) > 0
全部评论

相关推荐

uu们,拒offer时hr很生气怎么办我哭死
爱睡觉的冰箱哥:人家回收你的offer,或者oc后没给你发offer的时候可不会愧疚你,所以你拒了也没必要愧疚他。
点赞 评论 收藏
分享
06-12 17:46
门头沟学院 Java
运营你豪哥:来说重点: ​1.项目前置,时间倒序。​​ 2.​项目描述强化结果与量化效果(STAR原则里的R)。​​ ​3.个人技能精炼,明确掌握程度,突出核心。​​ ​4.增加强有力开头的个人总结部分。​​ 5.​优化教育背景(成绩排名)、合并奖项与活动。​​
听劝,我这个简历该怎么改...
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
2
2
分享

创作者周榜

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