Write SQL and Python, run instantly in your browser, and track your progress.
You are a Growth Analyst at X (Twitter). The Product team wants to understand how quickly new users become active by analyzing the time between account creation and first post. Join users with their posts, find each user's first post, and calculate days from signup to first post.
| Column Name | Type |
|---|---|
| user_id | int64 |
| username | object |
| join_date | object |
| account_status |
You are a Growth Analyst at X (Twitter). The Product team wants to understand how quickly new users become active by analyzing the time between account creation and first post. Join users with their posts, find each user's first post, and calculate days from signup to first post.
| Column Name | Type |
|---|---|
| user_id | int64 |
| username | object |
| join_date | object |
| account_status |
| object |
| object |
| Column Name | Type |
|---|---|
| post_id | int64 |
| user_id | int64 |
| content_type | object |
| created_at | object |
| status | object |
| Column Name | Type |
|---|---|
| post_id | int64 |
| user_id | int64 |
| content_type | object |
| created_at | object |
| status | object |
| user_id | username | join_date | account_status |
|---|---|---|---|
| 1 | andrea4 | 2025-03-31 19:11:04 | active |
| 2 | its_emily | 2025-02-10 22:12:29 | active |
| 3 | karen_wilson | 2025-04-23 11:08:04 |
| user_id | username | join_date | account_status |
|---|---|---|---|
| 1 | andrea4 | 2025-03-31 19:11:04 | active |
| 2 | its_emily | 2025-02-10 22:12:29 | active |
| 3 | karen_wilson | 2025-04-23 11:08:04 |
| post_id | user_id | content_type | created_at | status |
|---|---|---|---|---|
| 1 | 1 | video | 2025-05-28 17:39:24 | published |
| 2 | 1 | link | 2025-04-20 09:23:49 | published |
| post_id | user_id | content_type | created_at | status |
|---|---|---|---|---|
| 1 | 1 | video | 2025-05-28 17:39:24 | published |
| 2 | 1 | link | 2025-04-20 09:23:49 | published |
| user_id | username | join_date | first_post_date | days_to_first_post |
|---|---|---|---|---|
| 1 | andrea4 | 2025-03-31 19:11:04 | 2025-04-20 09:23:49 | 19 |
| 2 | its_emily | 2025-02-10 22:12:29 | 2025-03-28 11:40:27 | 45 |
| 3 | karen_wilson | 2025-04-23 11:08:04 | 2025-06-26 18:58:02 | 64 |
| user_id | username | join_date | first_post_date | days_to_first_post |
|---|---|---|---|---|
| 1 | andrea4 | 2025-03-31 19:11:04 | 2025-04-20 09:23:49 | 19 |
| 2 | its_emily | 2025-02-10 22:12:29 | 2025-03-28 11:40:27 | 45 |
| 3 | karen_wilson | 2025-04-23 11:08:04 | 2025-06-26 18:58:02 | 64 |
Showing first 5 of 55 rows.
Showing first 5 of 55 rows.
1. Data Selection:
2. DateTime Operations:
3. Output:
1. Data Selection:
2. DateTime Operations:
3. Output:
| active |
| active |
| 3 |
| 3 |
| 1 |
| 1 |
| image |
| image |
| 2025-06-02 01:35:31 |
| 2025-06-02 01:35:31 |
| published |
| published |
| 4 | 2 | poll | 2025-07-19 11:27:33 | published |
| 4 | 2 | poll | 2025-07-19 11:27:33 | published |
| 6 | 2 | text | 2025-03-28 11:40:27 | published |
| 6 | 2 | text | 2025-03-28 11:40:27 | published |
| 7 | 3 | poll | 2025-07-23 15:07:06 | published |
| 7 | 3 | poll | 2025-07-23 15:07:06 | published |
| 4 | liam80 | 2025-06-28 05:31:09 | 2025-07-04 08:56:32 | 6 |
| 4 | liam80 | 2025-06-28 05:31:09 | 2025-07-04 08:56:32 | 6 |
| 5 | liam21 | 2025-05-10 16:07:39 | 2025-06-02 00:27:49 | 22 |
| 5 | liam21 | 2025-05-10 16:07:39 | 2025-06-02 00:27:49 | 22 |