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

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

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

WITH t1 as(select tb2.*,tb1.issue_type
    from issue_tb tb1
    right join  answer_tb tb2
    on tb1.issue_id=tb2.issue_id),
t2 as(select distinct author_id ,  if(issue_type='Education',1,null) Education 
    from t1),
t3 as( select distinct author_id ,  if(issue_type='Career',1,null) Career 
    from t1)
select count(if(Education=1 and Career=1 ,1,null)) num from t3 
right join t2
on t2.author_id=t3.author_id

全部评论

相关推荐

07-24 13:43
门头沟学院 Java
longerluck...:我猜说的是“你真**是个天才”
投递美团等公司10个岗位
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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