Big Spenders of 2025
MediumDescription
Find the customers who spent more than ₹50,000 in 2025. Count only orders placed in 2025 that were not cancelled or returned. Show:
customer_idandfull_nameq1,q2,q3andq4: the totaltotal_amountof those orders in each quarter of 2025 (Q1 is January to March, and so on), 0 when there were nonespent_2025: the totaltotal_amountof those orders in the whole year
End your query with ORDER BY spent_2025 DESC, customer_id.
Tables
| customers |
|---|
| customer_id (PK) |
| full_name |
| orders |
|---|
| order_id (PK) |
| customer_id (FK) |
| order_date |
| status |
| total_amount |
| shipping_city |