`
冷寒冰
  • 浏览: 251567 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

controling the logical process phrase of join

阅读更多

 

select distinct c.companyname as customer,s.companyname as supplier
from sales.customers as c
left outer join
(
sales.orders as o
join
sales.orderdetails as od
on
o.orderid=od.orderid
join
production.products as p
on
p.productid=od.productid
join
production.suppliers as s
on
s.supplierid=p.supplierid
)
on o.custid=c.custid

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics