题解 | #月均完成试卷数不小于3的用户爱作答的类别#

月均完成试卷数不小于3的用户爱作答的类别

https://www.nowcoder.com/practice/b1d13efcfa0c4ecea517afbdb9090845

select
	tag,
    count(*) as tag_cnt
from exam_record er
join examination_info
	using (exam_id)
where exists (
	select
		uid,
		date_format(submit_time, '%Y%m'),
		count(*) as answer_cnt
	from exam_record
	join examination_info
		using (exam_id)
	where submit_time is not null
	group by uid, date_format(submit_time, '%Y%m')
	having answer_cnt >= 3 and er.uid = uid
)
group by tag
order by tag_cnt desc

全部评论

相关推荐

不愿透露姓名的神秘牛友
07-16 18:05
何尝不是一种学历歧视呢
码农索隆:楼主明确拒绝,并说明拒绝原因了,这hr倒是挺忠心护主的
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务