题解 | #确定哪些订单购买了 为 BR01 的产品(二)#
确定哪些订单购买了 prod_id 为 BR01 的产品(二)
https://www.nowcoder.com/practice/999aa31a9a504c60baa088d90d82e64d
select cust_id,order_date from Orders os inner join OrderItems oi on os.order_num = oi.order_num and prod_id = 'BR01' order by order_date asc
在表连接阶段筛选,且想要筛选被连接表的数据最好采用inner join