| SQL |
SELECT InventoryID, ProductID, ProductTypeID, ProductName, ProductPriceID, ProductSKU, WineryID, [Count], Allocated, OutOfStockOptionID, OutOfStockMessage, DisplayQuantityLeftAt, EmailNotificationAt, EmailTo, OutOfStockAt
FROM Inventory
WHERE WineryID = ?
AND ProductID IN (
SELECT P.ProductKeyID
FROM ProductsXKits PXK
JOIN Products P ON P.ProductID = PXK.ProductID
WHERE PXK.KitID = ?
)
|