select u.user_id, u.name, u.email from users u
inner join orders o on u.user_id = o.user_id
where o.payment_method = 'kakaopay'
구조 변경
1) 우선 kakaopay로 결제한 user_id를 모두 구해보기 → K
select user_id from orders
where payment_method = 'kakaopay'
2)그 후에, user_id가 K 에 있는 유저들만 골라보기 → 서브쿼리
select u.user_id, u.name, u.email from users u
where u.user_id in (
select user_id from orders
where payment_method = 'kakaopay'
)