Write SQL and Python, run instantly in your browser, and track your progress.
You are a Data Analyst at Meta. The Content team needs a report showing all posts with their author details. Some posts may have been created by deleted users, so use a left join to keep all posts even if the user no longer exists.
| Column Name | Type |
|---|---|
| post_id | int64 |
| user_id | int64 |
| content_text | object |
| content_type | object |
You are a Data Analyst at Meta. The Content team needs a report showing all posts with their author details. Some posts may have been created by deleted users, so use a left join to keep all posts even if the user no longer exists.
| Column Name | Type |
|---|---|
| post_id | int64 |
| user_id | int64 |
| content_text | object |
| content_type | object |
| visibility | object |
| visibility | object |
| created_at | object |
| created_at | object |
| status | object |
| status | object |
| Column Name | Type |
|---|---|
| user_id | int64 |
| username | object |
| full_name | object |
| object | |
| country | object |
| join_date | object |
| Column Name | Type |
|---|---|
| user_id | int64 |
| username | object |
| full_name | object |
| object | |
| country | object |
| join_date | object |
| post_id | user_id | content_text | content_type | visibility | created_at | status |
|---|---|---|---|---|---|---|
| 1 | 5 | Check out my new project! | text | public | 2025-01-15 | published |
| 2 |
| post_id | user_id | content_text | content_type | visibility | created_at | status |
|---|---|---|---|---|---|---|
| 1 | 5 | Check out my new project! | text | public | 2025-01-15 | published |
| 2 |
| user_id | username | full_name | country | join_date | account_status | is_verified | bio | |
|---|---|---|---|---|---|---|---|---|
| 5 | johndoe | John Doe | john@email.com | US | 2024-06-01 |
| user_id | username | full_name | country | join_date | account_status | is_verified | bio | |
|---|---|---|---|---|---|---|---|---|
| 5 | johndoe | John Doe | john@email.com | US | 2024-06-01 |
| post_id | username | full_name | content_text | content_type |
|---|---|---|---|---|
| 1 | andrea4 | Andrea Davis | Answering your questions about entrepreneurship | video |
| 2 | andrea4 | Andrea Davis | For everyone asking about technology, here's a helpful resource | link |
| 3 | andrea4 | Andrea Davis | Sunset vibes from Austin |
| post_id | username | full_name | content_text | content_type |
|---|---|---|---|---|
| 1 | andrea4 | Andrea Davis | Answering your questions about entrepreneurship | video |
| 2 | andrea4 | Andrea Davis | For everyone asking about technology, here's a helpful resource | link |
| 3 | andrea4 | Andrea Davis | Sunset vibes from Austin |
Showing first 5 of 230 rows.
Showing first 5 of 230 rows.
1. DataFrames:
2. Merge:
3. Output:
1. DataFrames:
2. Merge:
3. Output:
| account_status | object |
| account_status | object |
| is_verified | int64 |
| is_verified | int64 |
| bio | object |
| bio | object |
| 12 |
| 12 |
| Beautiful sunset today |
| Beautiful sunset today |
| image |
| image |
| public |
| public |
| 2025-01-16 |
| 2025-01-16 |
| published |
| published |
| 3 | 999 | This is from a deleted user | text | public | 2025-01-17 | published |
| 3 | 999 | This is from a deleted user | text | public | 2025-01-17 | published |
| active |
| active |
| 1 |
| 1 |
| Developer |
| Developer |
| 12 | jane_smith | Jane Smith | jane@email.com | US | 2024-07-15 | active | 0 | Photographer |
| 12 | jane_smith | Jane Smith | jane@email.com | US | 2024-07-15 | active | 0 | Photographer |
| image |
| image |
| 4 | its_emily | Emily Anderson | What's your take on web development? | poll |
| 4 | its_emily | Emily Anderson | What's your take on web development? | poll |
| 5 | its_emily | Emily Anderson | Morning coffee and good vibes | image |
| 5 | its_emily | Emily Anderson | Morning coffee and good vibes | image |