runtime
20 / 88

task CASE · easy

Price bands

Return name and price_band for every catalog item: 'budget' when price is under 25, 'standard' from 25 up to (not including) 100, 'premium' at 100 or more.

what to return

Columns
nameprice_band in this order
Rows
13 rows · any order
Watch for
An item priced exactly 25 is standard.
Skill
Bucket values with CASE. Refresher: Make decisions with CASE →

expected result

Your query should return exactly these columns and values. Run it and compare.

expected result13 rows · any order
nameprice_band
Desk Lampstandard
Floor lampstandard
String Lightsbudget

first 3 of 13 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 · keynametextcategorytextpricereal
1Desk LampLighting39
2Floor lampLighting89
3String LightsLighting19.5
4Chef KnifeKitchen59
5Cast Iron PanKitchen45

showing 5 of 13 rows

solution.sql
 

Hints and the answer are always available. Using them counts the question as solved with help.