Amazon-level task. **Condition:** For each month, find the top-3 customers by order sum. If sums are equal, include all with the same rank. **Table:** ecommerce_orders (customer_id, order_date, total_amount, ...) **Requirements:** 1. Group by months (DATE_TRUNC) 2. Use DENSE_RANK for correct equality handling 3. Output month, customer_id, total_amount, rank **Hint:** DENSE_RANK() OVER (PARTITION BY month ORDER BY total DESC)
Sign in to solve
Start Solving