题解 | #月均完成试卷数不小于3的用户爱作答的类别#
月均完成试卷数不小于3的用户爱作答的类别
https://www.nowcoder.com/practice/b1d13efcfa0c4ecea517afbdb9090845
#不知道错在哪里了?
select tag,count(*) from (select uid,exam_id,avg(submit_time) over(partition by uid,date_format(submit_time,'%y%m') ) avg_cn from exam_record)a
left join
(select* from examination_info)b
on a.exam_id=b.exam_id
where avg_cn>=3
group by tag