SELECT SKU, WarehouseID FROM SKU_DATA, WAREHOUSE;
SELECT * FROM ORDER_ITEM WHERE SKU IN (SELECT SKU FROM SKU_DATA WHERE Department="Water Sports");
SELECT WarehouseID, SKU_Description, sum(QuantityOnHand) AS Here, sum(QuantityOnOrder) AS ORDERED FROM INVENTORY WHERE SKU IN ( SELECT SKU FROM SKU_DATA WHERE Department="Camping") GROUP BY WarehouseID, SKU_Description with ROLLUP HAVING ORDERED > 200;
SELECT SKU FROM INVENTORY WHERE QuantityOnHand < 100; Now I need to look for the Buyer by SKU SELECT Buyer, SKU_Description FROM SKU_DATA WHERE SKU IN ( SELECT SKU FROM INVENTORY WHERE QuantityOnHand < 100);
SELECT BUYER FROM SKU_DATA WHERE SKU IN ( SELECT SKU FROM ORDER_ITEM WHERE OrderNumber IN ( SELECT OrderNumber FROM RETAIL_ORDER WHERE OrderMonth="January" AND OrderYear=2013));
Select * FROM SKU_DATA, ORDER_ITEM WHERE SKU_DATA.SKU = ORDER_ITEM.SKU;
SELECT * FROM ORDER_ITEM, RETAIL_ORDER WHERE RETAIL_ORDER.OrderNumber=ORDER_ITEM.OrderNumber;
SELECT Buyer, ExtendedPrice FROM SKU_DATA, ORDER_ITEM WHERE SKU_DATA.SKU = ORDER_ITEM.SKU; SELECT Buyer, ExtendedPrice, OrderMonth FROM SKU_DATA, ORDER_ITEM, RETAIL_ORDER WHERE SKU_DATA.SKU = ORDER_ITEM.SKU AND ORDER_ITEM.OrderNumber=RETAIL_ORDER.OrderNumber;