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

大小写混乱时的筛选统计

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

select
t2.tag,t1.answer_cnt
from
(
select 
tag,count(exam_id) answer_cnt
from examination_info
join exam_record using(exam_id)
group by tag
)t1
join
(
select 
tag,count(exam_id) answer_cnt
from examination_info
join exam_record using(exam_id)
group by tag
having answer_cnt<3
)t2 on t1.tag=upper(t2.tag)
where t1.tag<>t2.tag




#MySQL#
全部评论

相关推荐

不愿透露姓名的神秘牛友
06-30 18:19
点赞 评论 收藏
分享
每晚夜里独自颤抖:这个在牛客不是老熟人了吗
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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