Skip to main content

Walmart Inventory Status

MediumPremium

Walmart is one of the world's largest retail chains with a variety of products ranging from electronics to groceries. Shoppers come to Walmart to buy their desired items, and the company tracks its sales meticulously to understand market trends and customer preferences.

You're given two tables, products and sales:

product_idproduct_namecategory
integerstringstring
sale_idproduct_idquantity_soldsale_date
integerintegerintegerdate

Write a SQL query that returns a table listing all products, and marks those products that haven't been sold yet.

The output should contain the following columns: product_id, product_name, sale_status in which sale_status can either be “Sold” or “Not Sold”.