Write a query to find the top-selling product categories by gross margin over the last quarter at REVOLVE. For grading, treat the last quarter as April 1, 2025 through June 30, 2025, include completed orders only, and exclude products without a category or unit cost.
category, gross_margin, and margin_rank.gross_margin descending and category ascending to break ties.| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| order_date | DATE | Date the order was placed |
| status | VARCHAR(20) | Order processing status |
| Column | Type | Description |
|---|---|---|
| item_idPK | INT | Unique order line identifier |
| order_id | INT | Referenced order identifier |
| product_id | INT | Referenced product identifier |
| quantity | INT | Units sold on the line |
| unit_price | DECIMAL(10,2) | Selling price per unit |
| Column | Type | Description |
|---|---|---|
| product_idPK | INT | Unique product identifier |
| product_name | VARCHAR(100) | Product name |
| category | VARCHAR(50) | Product category |
| unit_cost | DECIMAL(10,2) | Cost per unit |