题解 | 返回购买 prod_id 为 BR01 的产品的所有顾客的电子邮件(一)
select cust_email from Customers s1 where exists ( select * from Orders s2 where exists ( select * from OrderItems s3 where s1.cust_id=s2.cust_id and s2.order_num=s3.order_num and prod_id='BR01' ) )
select cust_email from Customers s1 where exists ( select * from Orders s2 where exists ( select * from OrderItems s3 where s1.cust_id=s2.cust_id and s2.order_num=s3.order_num and prod_id='BR01' ) )
相关推荐