with t as(
    select author_id, issue_type
    from issue_tb i 
    join answer_tb a on i.issue_id = a.issue_id
)


select count(distinct author_id)'num'
from t
where issue_type = 'Education' and
author_id in (select author_id from t where issue_type = 'Career');
  • 实际上就是做Union,先筛选出在Education回答的用户,再判断其是否在Career中回答过