Write SQL and Python, run instantly in your browser, and track your progress.
You are a Growth Analyst at LinkedIn. The executive team wants to visualize user growth by showing the cumulative count and percentage of total users signed up over time. Calculate running totals and cumulative percentages for each user based on join date.
| Column Name | Type |
|---|---|
| user_id | int64 |
| username | object |
| full_name | object |
| join_date | object |
You are a Growth Analyst at LinkedIn. The executive team wants to visualize user growth by showing the cumulative count and percentage of total users signed up over time. Calculate running totals and cumulative percentages for each user based on join date.
| Column Name | Type |
|---|---|
| user_id | int64 |
| username | object |
| full_name | object |
| join_date | object |
| account_status | object |
| account_status | object |
| user_id | username | full_name | join_date | account_status |
|---|---|---|---|---|
| 1 | alice_w | Alice Wong | 2025-01-05 | active |
| 2 | bob_smith | Bob Smith | 2025-01-10 | active |
| user_id | username | full_name | join_date | account_status |
|---|---|---|---|---|
| 1 | alice_w | Alice Wong | 2025-01-05 | active |
| 2 | bob_smith | Bob Smith | 2025-01-10 | active |
| user_id | username | join_date | cumulative_users | pct_of_total |
|---|---|---|---|---|
| 6 | andrea_phoenix | 2024-09-13 | 1 | 1.70 |
| 27 | ananya53 | 2024-09-16 | 2 | 3.30 |
| 33 | officialandrea | 2024-09-18 | 3 | 5 |
| user_id | username | join_date | cumulative_users | pct_of_total |
|---|---|---|---|---|
| 6 | andrea_phoenix | 2024-09-13 | 1 | 1.70 |
| 27 | ananya53 | 2024-09-16 | 2 | 3.30 |
| 33 | officialandrea | 2024-09-18 | 3 | 5 |
Showing first 5 of 60 rows.
Showing first 5 of 60 rows.
1. Data Selection:
2. Window Functions:
3. Output:
1. Data Selection:
2. Window Functions:
3. Output:
| 3 |
| 3 |
| carol_j |
| carol_j |
| Carol Jones |
| Carol Jones |
| 2025-01-15 |
| 2025-01-15 |
| active |
| active |
| 4 | david_m | David Miller | 2025-01-20 | active |
| 4 | david_m | David Miller | 2025-01-20 | active |
| 5 | eve_chen | Eve Chen | 2025-01-25 | active |
| 5 | eve_chen | Eve Chen | 2025-01-25 | active |
| 47 | its_amanda | 2024-10-04 | 4 | 6.70 |
| 47 | its_amanda | 2024-10-04 | 4 | 6.70 |
| 9 | its_deepa | 2024-10-15 | 5 | 8.30 |
| 9 | its_deepa | 2024-10-15 | 5 | 8.30 |