Write a SQL query to find the total premium written by line of business for the current fiscal year at AXA XL.
Use the provided premium transaction, line of business, and fiscal year data. Include written transactions for the fiscal year marked as current, and exclude transactions that are not written or lack a line of business.
line_of_business and total_premium_written.| Column | Type | Description |
|---|---|---|
| premium_transaction_idPK | INT | Unique premium transaction identifier |
| line_of_business_id | INT | Reference to the line of business |
| fiscal_year_id | INT | Reference to the fiscal year |
| premium_amount | NUMERIC(14,2) | Premium amount for the transaction |
| transaction_status | VARCHAR(20) | Transaction status |
| Column | Type | Description |
|---|---|---|
| line_of_business_idPK | INT | Unique line-of-business identifier |
| line_of_business_name | VARCHAR(80) | AXA XL line-of-business name |
| Column | Type | Description |
|---|---|---|
| fiscal_year_idPK | INT | Unique fiscal year identifier |
| fiscal_year | INT | Fiscal year number |
| fiscal_year_label | VARCHAR(20) | Display label for the fiscal year |
| is_current | BOOLEAN | Whether this is the current fiscal year |