Hi, I’m experimenting with the CASE function at the end of the Aggregate Function lesson using the fake_apps table. I input the following code to try to categorize the different app price levels, but the query is unsuccessful and the program won’t indicate why or how the syntax is incorrect:
SELECT id, name, category, ROUND(price, 2) AS price_rounded,
WHEN price_rounded >= 10 THEN ‘Expensive’
WHEN price_rounded >= 5 AND < 10 THEN ‘Moderate’
ELSE price_rounded < 5 THEN ‘Low’
END AS ‘Price_Level’
Can anyone help me debug this syntax?
Here’s the exercise link:
Thanks, in advance.