I have some difficulties to answer the following questions
1 Write an SQL statement to show the SKU and SKU_Description for all items that have not been ordered.
SELECT SKU,SKU_DESCRIPTION
FROM SKU_DATA
INNER JOIN ORDER_ITEM
ON SKU_DATA.SKU =ORDER_ITEM.SKU;
I do not know how to write the condition to compare and display the SKU that is present in SKU_Data but are not present on order_item...
Here the different tables available
Inventory (WarehouseID,SKU,SKU_Description,QuantityOnHand,QuantityOnOrder)
Order_Item(OrderNumber,SKU,Quantity,Price,ExtendedPrice)
Retail_order(OrderNumber,StoreNumber,StoreZip,OrderMonth,OrderYear,OrderTotal)
SKU_Data(SKU,SKU_Description,Department,Buyer)
Warehouse(WarehouseCity,WarehouseState,Manager,SquareFeet)
Thank you
question from:
https://stackoverflow.com/questions/66057207/finding-missing-data-between-two-tables-mysql-workench 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…