题解 | 统计作答次数
SELECT COUNT(id) AS total_pv , COUNT(submit_time) AS compelete_pv, (SELECT COUNT(DISTINCT(exam_id)) FROM exam_record WHERE score IS NOT NULL) AS complete_exam_cnt FROM exam_record
SELECT COUNT(id) AS total_pv , COUNT(submit_time) AS compelete_pv, (SELECT COUNT(DISTINCT(exam_id)) FROM exam_record WHERE score IS NOT NULL) AS complete_exam_cnt FROM exam_record
相关推荐