题解 | #SQL类别高难度试卷得分的截断平均值#

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

http://www.nowcoder.com/practice/962b16554fbf4b99a87f4d68020c5bfb

select cust_email
from Customers AS c
left join Orders as o
on c.cust_id = o.cust_id
left join OrderItems as oi
on oi.order_num = o.order_num
where oi.prod_id = 'BR01'
全部评论
没问题,但这题是练习使用子查询。
3 回复 分享
发布于 2022-04-15 12:49
select cust_email from Customers AS c join Orders as o on c.cust_id = o.cust_id join OrderItems as oi on oi.order_num = o.order_num AND prod_id ='BR01';
点赞 回复 分享
发布于 2022-09-12 10:56 四川

相关推荐

one_t:硕还是本?什么岗
点赞 评论 收藏
分享
13 收藏 评论
分享
牛客网
牛客企业服务