Write SQL and Python, run instantly in your browser, and track your progress.
You are a Product Analyst at Meta. The Content team wants to understand which days of the week users post most frequently. Extract the day of week from each post's created_at timestamp, where Monday=0 and Sunday=6.
| Column Name | Type |
|---|---|
| post_id | int64 |
| user_id | int64 |
| content_type | object |
| created_at | object |
You are a Product Analyst at Meta. The Content team wants to understand which days of the week users post most frequently. Extract the day of week from each post's created_at timestamp, where Monday=0 and Sunday=6.
| Column Name | Type |
|---|---|
| post_id | int64 |
| user_id | int64 |
| content_type | object |
| created_at | object |
| status | object |
| status | object |
| 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 |
| post_id | user_id | created_at | day_of_week |
|---|---|---|---|
| 1 | 1 | 2025-05-28 17:39:24 | 2 |
| 2 | 1 | 2025-04-20 09:23:49 | 6 |
| 3 | 1 | 2025-06-02 01:35:31 | 0 |
| 4 | 2 | 2025-07-19 11:27:33 | 5 |
| post_id | user_id | created_at | day_of_week |
|---|---|---|---|
| 1 | 1 | 2025-05-28 17:39:24 | 2 |
| 2 | 1 | 2025-04-20 09:23:49 | 6 |
| 3 | 1 | 2025-06-02 01:35:31 | 0 |
| 4 | 2 | 2025-07-19 11:27:33 | 5 |
Showing first 5 of 230 rows.
Showing first 5 of 230 rows.
1. Data Selection:
2. DateTime Operations:
3. Output:
1. Data Selection:
2. DateTime Operations:
3. Output:
| 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 |
| 5 | 2 | image | 2025-08-04 14:31:30 | hidden |
| 5 | 2 | image | 2025-08-04 14:31:30 | hidden |
| 5 | 2 | 2025-08-04 14:31:30 | 0 |
| 5 | 2 | 2025-08-04 14:31:30 | 0 |