The shop wants three price bands: 'cheap' when price is under 10, 'normal' from 10 to 19, and 'pricey' for 20 and up. Pick each product's name and its band.
| id | name | category | price | stock |
|---|---|---|---|---|
| 1 | Milk tea | drink | 12 | 30 |
| 2 | Lemon water | drink | 8 | 50 |
| 3 | Cheesecake | cake | 25 | 6 |
| 4 | Cookie | snack | 5 | 80 |
| 5 | Brownie | cake | 18 | 0 |
| 6 | Iced coffee | drink | 15 | 20 |
| 7 | Chips | snack | 7 | 40 |
| 8 | Fruit tart | cake | 28 | 4 |
| id | name | category | price | stock |
|---|---|---|---|---|
| 1 | Milk tea | drink | 12 | 30 |
| 2 | Lemon water | drink | 8 | 50 |
| 3 | Cheesecake | cake | 25 | 6 |
| 4 | Cookie | snack | 5 | 80 |
| 5 | Brownie | cake | 18 | 0 |
| 6 | Iced coffee | drink | 15 | 20 |
| 7 | Chips | snack | 7 | 40 |
| 8 | Fruit tart | cake | 28 | 4 |
SELECT name,
CASE
-- your code here: two WHENs (price < 10, price < 20) and an ELSE
END
FROM products;
Run shows what your query gives. When it looks right, Submit.