题解 | #大小写混乱时的筛选统计#

大小写混乱时的筛选统计

http://www.nowcoder.com/practice/81cb12931a604811ae69d332515c7734

with q as 
(select 
		tag,
		count(start_time) as answer_cnt
from exam_record er right join examination_info ei
on er.exam_id = ei.exam_id
where start_time is not null
group by tag),
qq as
(
select 
		tag
from exam_record er right join examination_info ei
on er.exam_id = ei.exam_id
where start_time is not null
group by tag
having count(start_time)<3
)
select qq.tag, q.answer_cnt
from q,qq
where q.tag = upper(qq.tag) and q.tag != qq.tag;#如果转换后tag并没有发生变化,不输出该条结果。
全部评论

相关推荐

野猪不是猪🐗:这种直接口头上答应,骗面试,面完了直接拉黑,相当于给自己攒面经了(
点赞 评论 收藏
分享
评论
2
1
分享

创作者周榜

更多
牛客网
牛客企业服务