1.新采购需求查询
SELECT
p.sku,
g.GoodsName,
w.WarehouseID,
w.WarehouseName,
s.FullName
FROM
PurchaseRequires p
JOIN Goods g ON p.SKU = g.SKU
JOIN Warehouses w ON w.WarehouseID = p.WarehouseID
JOIN PurchasePrices pp ON pp.SKU = p.SKU
JOIN Suppliers s ON s.SupplierID = pp.SupplierID
WHERE
pp.Status = 'TRUE'
AND pp.IsDefault = 'TRUE'
ORDER BY
p.SKU