task LIMIT · warm-up
The three cheapest items
Return the name and price of the 3 cheapest catalog items, cheapest first.
what to return
- Columns
namepricein this order- Rows
- 3 rows · in the order asked
- Watch for
- Break price ties by name A→Z.
- Skill
- Combine ORDER BY with LIMIT. Refresher: Sort & limit →
expected result
Your query should return exactly these columns and values. Run it and compare.
expected result3 rows · in this order
| name | price |
|---|---|
| Notebook Set | 12 |
| Seed Starter Kit | 15 |
| String Lights | 19.5 |
all 3 rows
data you can query
Sample rows from each table. Each column shows its type underneath; → marks a link to another table.
catalog_items4 columns · 13 rows
| idinteger · key | nametext | categorytext | pricereal |
|---|---|---|---|
| 1 | Desk Lamp | Lighting | 39 |
| 2 | Floor lamp | Lighting | 89 |
| 3 | String Lights | Lighting | 19.5 |
| 4 | Chef Knife | Kitchen | 59 |
| 5 | Cast Iron Pan | Kitchen | 45 |
showing 5 of 13 rows
solution.sql
Hints and the answer are always available. Using them counts the question as solved with help.