题解 | #每个题目和每份试卷被作答的人数和次数#
每个题目和每份试卷被作答的人数和次数
https://www.nowcoder.com/practice/203d0aed8928429a8978185d9a03babc
select exam_id as tid,count(distinct exam_record.uid) as uv, count(*) as pv from exam_record group by exam_id union select question_id as tid,count(distinct practice_record.uid) as uv, count(*) as pv from practice_record group by question_id order by left(tid,1) DESC, uv DESC,pv DESC;