Categorize each product's price tier: 'expensive' when price >= 100, 'moderate' when price >= 30, or
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
Problem
Categorize each product's price tier: 'expensive' when price >= 100, 'moderate' when price >= 30, or 'cheap' otherwise. Select product_name, price, and the label as price_tier.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.