Write a SQL query to identify customer churn trends across our subscription tiers over the last four quarters at Intuit.
For this exercise, use calendar quarters 2025 Q1 through 2025 Q4. Treat a customer as active at a quarter's start when the subscription began before that date and had not yet been canceled. Treat cancellations during the quarter as churn.
quarter, tier_name, active_customers_start, churned_customers, and churn_rate.NULL for rates with no active customers, and order by quarter chronologically, then tier name alphabetically.| Column | Type | Description |
|---|---|---|
| tier_idPK | INT | Unique subscription tier identifier |
| tier_name | VARCHAR(100) | Intuit subscription tier name |
| Column | Type | Description |
|---|---|---|
| subscription_idPK | INT | Unique subscription identifier |
| customer_id | INT | Customer associated with the subscription |
| tier_id | INT | Subscription tier identifier |
| started_at | DATE | Subscription start date |
| canceled_at | DATE | Subscription cancellation date |