Easy
WHERE

Products with Limited Stock

Find products with fewer than 200 units in stock, cheapest first. Return columns: name, category, price, stock. Order results by: price.

Preparing the interactive SQL workspace...

Challenge overview

What you will practice

Find products with fewer than 200 units in stock, cheapest first. Return columns: name, category, price, stock. Order results by: price.

Difficulty
Beginner
SQL concept
WHERE

Public schema and sample data

customers

id INTEGERname TEXTemail TEXTcountry TEXTjoined_date TEXT
1Acme Corpacme@corp.comUSA2020-01-15
2TechStart Ltdts@techstart.ioUK2020-03-22
3DataFlow Incinfo@dataflow.comUSA2021-06-10

products

id INTEGERname TEXTcategory TEXTprice REALstock INTEGER
1Analytics DashboardSoftware299999
2Data WarehouseInfrastructure149950
3ML PipelineSoftware799999

orders

id INTEGERcustomer_id INTEGERorder_date TEXTtotal_amount REALstatus TEXT
112024-01-102697completed
222024-01-15799completed
312024-02-011499completed

order_items

id INTEGERorder_id INTEGERproduct_id INTEGERquantity INTEGERunit_price REAL
1113299
214899
3231799