题解 | 月均完成试卷数不小于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


题目表达能力有待提高

全部评论

相关推荐

点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务