Skip to main content
All Problems
easy0% acceptance

Classify Orders by Size

The analytics team wants to segment orders by value. Write a query that returns the order id, total_amount, and a new column called order_size that labels orders as 'Small' (under 50), 'Medium' (50 to 200 inclusive), or 'Large' (over 200).

Schema

🔑idINT
🔗customer_idINT
order_dateTEXT
statusTEXT
total_amountREAL
postgresql

Run your query to see results

Press Ctrl + Enter to execute