题解 | 月均完成试卷数不小于3的用户爱作答的类别
月均完成试卷数不小于3的用户爱作答的类别
https://www.nowcoder.com/practice/b1d13efcfa0c4ecea517afbdb9090845
with a as( select uid, month(start_time) as m, count(submit_time) as cnt from exam_record er join examination_info ei on er.exam_id = ei.exam_id group by uid,month(start_time) having cnt>=3) select tag, count(*) as tag_cnt from exam_record er join examination_info ei on er.exam_id = ei.exam_id where uid in (select uid from a) group by tag order by tag_cnt desc
题目表达能力有待提高