题解 | #返回购买 prod_id 为 BR01 的产品的所有顾客的电子邮件(一)#
返回购买 prod_id 为 BR01 的产品的所有顾客的电子邮件(一)
http://www.nowcoder.com/practice/962b16554fbf4b99a87f4d68020c5bfb
SELECT cust_email
FROM Customers
WHERE cust_id IN (
SELECT cust_id
FROM OrderItems ot
LEFT JOIN Orders o ON ot.order_num = o.order_num
WHERE prod_id = 'BR01'
);