Practice Interview Questions
| Question | Status |
|---|---|
Write a SQL query to find the top 2 power users who sent the most messages on Microsoft Teams in August 2022. Display the IDs of these 2 users along with the total number of messages they sent.
messages table:
| Column Name | Description |
|---|---|
| message_id | Unique identifier for each message |
| sender_id | user ID who sent the message |
| receiver_id | user ID who received the message |
| content | Content of the message |
| sent_date | Time the message was sent |
Write a SQL query to find the top 2 power users who sent the most messages on Microsoft Teams in August 2022. Display the IDs of these 2 users along with the total number of messages they sent.
messages table:
| Column Name | Description |
|---|---|
| message_id | Unique identifier for each message |
| sender_id | user ID who sent the message |
| receiver_id | user ID who received the message |
| content | Content of the message |
| sent_date | Time the message was sent |
| sender_id | message_count |
|---|---|
| 3601 | 2 |
| 4500 | 1 |
| sender_id | message_count |
|---|---|
| 3601 | 2 |
| 4500 | 1 |