0

列出每个供应商的名称以及每个仓库的位置以及该供应商提供并存放在该仓库的产品数量

4

2 回答 2

0

这些表应该连接在一起,然后应该应用 where 子句来由销售代表 Jim Burns 进行过滤。

select c.name, w.location 
from Salesrep s 
join Warehouse w
on s.Rep_No = w.Rep_No
join Customer c 
on w.Warehouse_No = c.Warehouse_No
where s.Name = 'Jim Burns'
于 2013-01-08T10:09:51.970 回答
0
SELECT
    c.Name,
    w.Location   
FROM  salesrep as s
LEFT JOIN warehouse as w ON w.Rep_No = s.Rep_No
LEFT JOIN Customer as c ON c.Warehouse_No = w.Warehouse_No
WHERE s.Name = 'Rep Jim Burns';
于 2013-01-08T10:11:16.497 回答