题解 | #SQL15 统计作答次数#

统计作答次数

http://www.nowcoder.com/practice/45a87639110841b6950ef6a12d20175f

方法一:子查询

select count(start_time) total_pv,
count(submit_time) complete_pv,
(
    select count(distinct(exam_id)) from exam_record where submit_time is not null
) complete_exam_cnt
from exam_record;

方法二:

select count(start_time) total_pv,
count(submit_time) complete_pv,
count(distinct(exam_id) and submit_time is not null)
from exam_record;
全部评论

相关推荐

夏目LTH:这个真的很看运气,多投吧。我从去年十二月底一直投到现在,之前没一个offer,结果两周前投的一家面试官聊的特别好,直接速通offer还给的SP待遇开的比我期望都够。
我的求职进度条
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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