Write SQL and Python, run instantly in your browser, and track your progress.
You are a Product Analyst at Netflix. The Customer Support team needs subscription status displayed in user-friendly terms for their dashboard. Use the map() function to convert internal status codes to readable labels.
| Column Name | Type |
|---|---|
| subscription_id | int64 |
| user_id | int64 |
| plan_id | int64 |
| start_date | object |
You are a Product Analyst at Netflix. The Customer Support team needs subscription status displayed in user-friendly terms for their dashboard. Use the map() function to convert internal status codes to readable labels.
| Column Name | Type |
|---|---|
| subscription_id | int64 |
| user_id | int64 |
| plan_id | int64 |
| start_date | object |
| end_date | object |
| end_date | object |
| status | object |
| status | object |
| auto_renew | int64 |
| auto_renew | int64 |
| subscription_id | user_id | plan_id | start_date | end_date | status | auto_renew |
|---|---|---|---|---|---|---|
| 1 | 58 | 6 | 2025-07-26 | active | 1 | |
| 2 |
| subscription_id | user_id | plan_id | start_date | end_date | status | auto_renew |
|---|---|---|---|---|---|---|
| 1 | 58 | 6 | 2025-07-26 | active | 1 | |
| 2 |
| subscription_id | user_id | status | auto_renew | status_label |
|---|---|---|---|---|
| 1 | 58 | active | 1 | Currently Active |
| 2 | 41 | canceled | 0 | User Canceled |
| 3 | 44 | canceled | 0 | User Canceled |
| subscription_id | user_id | status | auto_renew | status_label |
|---|---|---|---|---|
| 1 | 58 | active | 1 | Currently Active |
| 2 | 41 | canceled | 0 | User Canceled |
| 3 | 44 | canceled | 0 | User Canceled |
Showing first 5 of 75 rows.
Showing first 5 of 75 rows.
1. Data Selection:
2. Transformation:
3. Output:
1. Data Selection:
2. Transformation:
3. Output:
| 41 |
| 41 |
| 11 |
| 11 |
| 2025-03-15 |
| 2025-03-15 |
| 2025-05-29 |
| 2025-05-29 |
| canceled |
| canceled |
| 0 |
| 0 |
| 3 | 44 | 10 | 2025-06-28 | 2025-08-04 | canceled | 0 |
| 3 | 44 | 10 | 2025-06-28 | 2025-08-04 | canceled | 0 |
| 4 | 2 | 2 | 2025-02-27 | 2025-07-25 | expired | 0 |
| 4 | 2 | 2 | 2025-02-27 | 2025-07-25 | expired | 0 |
| 5 | 55 | 3 | 2025-07-10 | active | 1 |
| 5 | 55 | 3 | 2025-07-10 | active | 1 |
| 4 | 2 | expired | 0 | Subscription Expired |
| 4 | 2 | expired | 0 | Subscription Expired |
| 5 | 55 | active | 1 | Currently Active |
| 5 | 55 | active | 1 | Currently Active |