题解 |返回购买 prod_idBR01的所有顾客的电子邮件

返回购买 prod_id 为 BR01 的产品的所有顾客的电子邮件(二)

https://www.nowcoder.com/practice/c7aa73afc41f4dfc925baebdd175c345

where 简单联结:

select c.cust_email
from OrderItems a,Orders b,Customers c
where c.cust_id=b.cust_id 
	and a.order_num=b.order_num 
	and a.prod_id ='BR01'

inner join 内联结:

select c.cust_email
from Orders b   #注意以下两条件中b是公共的
inner join OrderItems a on a.order_num=b.order_num
inner join Customers c on c.cust_id=b.cust_id
where  a.prod_id ='BR01'
全部评论

相关推荐

04-06 11:24
已编辑
太原学院 C++
点赞 评论 收藏
分享
04-25 19:29
已编辑
宁波大学 运营
路过的咸蛋超人也想拿offer:你是我见过最美的牛客女孩
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务