Write a query to identify the top-performing insurance products over the last quarter.
Use insurance_products and policy_transactions. Define performance by total premium collected during the previous completed calendar quarter.
product_name, policy_count, total_premium, and performance_rank.| Column | Type | Description |
|---|---|---|
| product_idPK | INT | Unique insurance product identifier |
| product_name | VARCHAR(100) | Insurance product name |
| product_category | VARCHAR(50) | Product classification |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique policy transaction identifier |
| product_id | INT | Associated insurance product identifier |
| transaction_date | DATE | Date the policy transaction was recorded |
| premium_amount | NUMERIC(12,2) | Premium collected for the transaction |