题解 | #月均完成试卷数不小于3的用户爱作答的类别#
月均完成试卷数不小于3的用户爱作答的类别
https://www.nowcoder.com/practice/b1d13efcfa0c4ecea517afbdb9090845
-- 这个题就答案来讲应该指的就是2021年9月份的
-- 然后这个思路就可以先汇总uid得出大于3的作为子查询用来筛选符合的uid再正常汇总tag
select tag,count(*)
from exam_record e1
left join examination_info e2 on e1.exam_id=e2.exam_id
where uid in
(select uid
from exam_record
where date_format(start_time,'%Y%m')=202109
group by uid
having count(submit_time)>=3)
group by tag
order by count(*) desc;
查看19道真题和解析
