Your question is Message Senders Without Voice Joins. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
You are given a Discord-style event log that records user actions across surfaces such as text chat and voice. Write a SQL query to return the users who have sent at least one message but have never joined a voice channel.
Use only the user_interactions table. Your result should include each qualifying user_id, the number of message events they generated, and be ordered by message count descending and then user_id ascending.
| Column | Type | Description |
|---|---|---|
| interaction_idPK | INT | Unique interaction event ID |
| user_id | INT | User who performed the interaction |
| event_type | VARCHAR(50) | Interaction type such as message sent or voice channel joined |
| channel_id | INT | Associated text or voice channel ID |
| event_ts | TIMESTAMP | Timestamp of the interaction |