题解 | 回答过教育类问题的用户里有多少用户回答过职场类问题

某乎问答回答过教育类问题的用户里有多少用户回答过职场类问题

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

# 3.22 9:17 ~ 25  8min

# 字段:num

# tb1:回答过教育类 且 回答过职场类  的用户数量
with tb1 as (
    select distinct author_id,issue_type
    from answer_tb left join issue_tb using(issue_id)
    where issue_type = 'Education' or issue_type = 'Career'

    order by author_id
),

# 结果查询
tb2 as(
    select author_id,count(issue_type) as num
    from tb1 
    group by author_id
    having num >= 2
)
select count(num) as num
from tb2

全部评论

相关推荐

05-09 12:23
已编辑
华南理工大学 Java
野猪不是猪🐗:给他装的,双九+有实习的能看的上这种厂我直接吃⑨✌们拿它练练面试愣是给他整出幻觉了
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
05-28 12:15
点赞 评论 收藏
分享
06-26 19:47
中南大学 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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