Write a query to identify top-performing product categories over a specific time period.
Use completed orders from January 1, 2025 through March 31, 2025, inclusive. Define performance using total revenue, with units sold and category name used to break ties. Exclude cancelled or returned orders and products without a category.
Output
- One row per category among the top three ranked categories
- Columns:
category, total_revenue, units_sold, order_count, and performance_rank
- Sort by
performance_rank ascending, then category ascending