with temp as (
select
author_id
from
answer_tb a left join issue_tb i on a.issue_id = i.issue_id
group by
author_id
having
sum(if(issue_type='Education',1,0)) > 0 and sum(if(issue_type='Career',1,0)) > 0
)
select
count(*) as num
from
temp

京公网安备 11010502036488号