Write SQL and Python, run instantly in your browser, and track your progress.
You are a Messaging SRE Analyst at Meta. The team needs to understand member pacing for recent direct messages to optimize platform performance. For members with active accounts, your task is to list direct messages from the last 60 days and compute the time elapsed since that member's prior message. Exclude removed messages. Show sender identifier, message identifier, send time, previous send time, and the elapsed seconds. Sort by the smallest sender identifier; within each sender, sort by send time ascending and break ties by the smallest message identifier.
| Column Name | Type |
|---|---|
| message_id | INTEGER |
| sender_user_id | INTEGER |
| recipient_user_id | INTEGER |
You are a Messaging SRE Analyst at Meta. The team needs to understand member pacing for recent direct messages to optimize platform performance. For members with active accounts, your task is to list direct messages from the last 60 days and compute the time elapsed since that member's prior message. Exclude removed messages. Show sender identifier, message identifier, send time, previous send time, and the elapsed seconds. Sort by the smallest sender identifier; within each sender, sort by send time ascending and break ties by the smallest message identifier.
| Column Name | Type |
|---|---|
| message_id | INTEGER |
| sender_user_id | INTEGER |
| recipient_user_id | INTEGER |
| sent_at | TEXT |
| sent_at | TEXT |
| content_text | TEXT |
| content_text | TEXT |
| status | TEXT |
| status | TEXT |
| message_id | sender_user_id | recipient_user_id | sent_at | content_text | status |
|---|---|---|---|---|---|
| 1 | 1 | 33 | 2025-04-18 02:49:41 | Hi! I'm working on something similar. Would love to chat! | delivered |
| 2 | 1 | 4 |
| message_id | sender_user_id | recipient_user_id | sent_at | content_text | status |
|---|---|---|---|---|---|
| 1 | 1 | 33 | 2025-04-18 02:49:41 | Hi! I'm working on something similar. Would love to chat! | delivered |
| 2 | 1 | 4 |
| Column Name | Type |
|---|---|
| user_id | INTEGER |
| username | TEXT |
| full_name | TEXT |
| TEXT | |
| country | TEXT |
| join_date | TEXT |
| Column Name | Type |
|---|---|
| user_id | INTEGER |
| username | TEXT |
| full_name | TEXT |
| TEXT | |
| country | TEXT |
| join_date | TEXT |
| user_id | username | full_name | country | join_date | account_status | is_verified | bio | |
|---|---|---|---|---|---|---|---|---|
| 1 | andrea4 | Andrea Davis | andrea.davis@gmail.com | AU | 2025-03-31 19:11:04 |
| user_id | username | full_name | country | join_date | account_status | is_verified | bio | |
|---|---|---|---|---|---|---|---|---|
| 1 | andrea4 | Andrea Davis | andrea.davis@gmail.com | AU | 2025-03-31 19:11:04 |
| sender_user_id | message_id | sent_at | prev_sent_at | seconds_since_prev |
|---|---|---|---|---|
| 1 | 15 | 2025-07-13 20:40:54 | ||
| 1 | 18 | 2025-07-25 08:44:52 | 2025-07-13 20:40:54 | 993838 |
| 1 | 11 | 2025-07-28 05:45:51 | 2025-07-25 08:44:52 | 248459 |
| sender_user_id | message_id | sent_at | prev_sent_at | seconds_since_prev |
|---|---|---|---|---|
| 1 | 15 | 2025-07-13 20:40:54 | ||
| 1 | 18 | 2025-07-25 08:44:52 | 2025-07-13 20:40:54 | 993838 |
| 1 | 11 | 2025-07-28 05:45:51 | 2025-07-25 08:44:52 | 248459 |
Showing first 3 of 1500 rows.
Showing first 3 of 1500 rows.
| 2025-04-10 02:40:32 |
| 2025-04-10 02:40:32 |
| Thanks for sharing that resource! Super helpful. |
| Thanks for sharing that resource! Super helpful. |
| delivered |
| delivered |
| 3 | 2 | 58 | 2025-07-04 22:32:15 | Quick question - what tools do you use for productivity? | read |
| 3 | 2 | 58 | 2025-07-04 22:32:15 | Quick question - what tools do you use for productivity? | read |
| 4 | 2 | 5 | 2025-04-24 01:06:27 | Hi there! Fellow Developer here. Love your work! | read |
| 4 | 2 | 5 | 2025-04-24 01:06:27 | Hi there! Fellow Developer here. Love your work! | read |
| 5 | 2 | 50 | 2025-08-22 06:30:27 | Hey! Saw your post about productivity. Really resonated with me. | delivered |
| 5 | 2 | 50 | 2025-08-22 06:30:27 | Hey! Saw your post about productivity. Really resonated with me. | delivered |
| account_status | TEXT |
| account_status | TEXT |
| is_verified | INTEGER |
| is_verified | INTEGER |
| bio | TEXT |
| bio | TEXT |
| active |
| active |
| 0 |
| 0 |
| 2 | its_emily | Emily Anderson | emily.anderson@proton.me | DE | 2025-02-10 22:12:29 | active | 0 | Entrepreneur | crypto enthusiast | Tokyo |
| 2 | its_emily | Emily Anderson | emily.anderson@proton.me | DE | 2025-02-10 22:12:29 | active | 0 | Entrepreneur | crypto enthusiast | Tokyo |
| 3 | karen_wilson | Karen Wilson | karen.wilson@yahoo.com | ES | 2025-04-23 11:08:04 | active | 1 | travel lover. Student. Living my best life. |
| 3 | karen_wilson | Karen Wilson | karen.wilson@yahoo.com | ES | 2025-04-23 11:08:04 | active | 1 | travel lover. Student. Living my best life. |
| 4 | liam80 | Liam O'Brien | liam.o'brien@gmail.com | AU | 2025-06-28 05:31:09 | active | 1 | reading lover. Student. Living my best life. |
| 4 | liam80 | Liam O'Brien | liam.o'brien@gmail.com | AU | 2025-06-28 05:31:09 | active | 1 | reading lover. Student. Living my best life. |
| 5 | liam21 | Liam Patel | liam.patel@proton.me | SG | 2025-05-10 16:07:39 | active | 0 | nature | photography | Tokyo based |
| 5 | liam21 | Liam Patel | liam.patel@proton.me | SG | 2025-05-10 16:07:39 | active | 0 | nature | photography | Tokyo based |