题解 | #返回购买BR01 的产品的所有顾客的电子邮件#
返回购买 prod_id 为 BR01 的产品的所有顾客的电子邮件(二)
https://www.nowcoder.com/practice/c7aa73afc41f4dfc925baebdd175c345
select cust_email
from Customers c
inner join Orders o on c.cust_id = o.cust_id
where o.order_num in (
select order_num
from OrderItems
where prod_id = 'BR01'
);
可以使用嵌套查询和inner join
