题解 | #统计有未完成状态的试卷的未完成数和未完成率#
统计有未完成状态的试卷的未完成数和未完成率
https://www.nowcoder.com/practice/69fc2b1df4144c0991e4b8280d8aba27
select exam_id,count(submit_time is null or null) as incomplete_cnt, round(count(submit_time is null or null)/count(*),3) as complete_rate from exam_record t group by t.exam_id having incomplete_cnt > 0
null 值统计,这个在前面的题中已大量出现,题目顺序应该提前