How would you use JOINs to combine policy, customer, and campaign tables?
For this exercise, the provided policy_customer_campaign table contains the policy, customer, and campaign attributes needed for the result. Write a query that returns active policies associated with a campaign.
policy_id, customer_id, customer_name, campaign_id, campaign_name, and premium_amountpremium_amount descending, then policy_id ascending| Column | Type | Description |
|---|---|---|
| policy_idPK | INT | Unique policy identifier |
| customer_id | INT | Customer associated with the policy |
| customer_name | VARCHAR(100) | Customer full name |
| campaign_id | INT | Campaign associated with the policy |
| campaign_name | VARCHAR(120) | Campaign name |
| policy_status | VARCHAR(20) | Current policy status |
| premium_amount | DECIMAL(10,2) | Policy premium amount |