task INSERT / UPDATE / DELETE · easy
Reprice the garden range
Raise the price of every Garden item by 10%, and delete the item named 'Wall Clock' (it was never sold). Then return id, name and price of all catalog items.
what to return
- Columns
idnamepricein this order- Rows
- 12 rows · any order
- Watch for
- Round price to 2 decimals in the output.
- Other categories keep their prices.
- Skill
- Change and remove rows safely with WHERE. Refresher: DML: INSERT, UPDATE & DELETE →
expected result
Your query should return exactly these columns and values. Run it and compare.
expected result12 rows · any order
| id | name | price |
|---|---|---|
| 1 | Desk Lamp | 39 |
| 2 | Floor lamp | 89 |
| 3 | String Lights | 19.5 |
first 3 of 12 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.