Tinder's messaging analytics team wants to identify the first message sent by each user. This helps measure how quickly new matches begin conversations.
Write a PostgreSQL query against user_messages to return the first message for every user with at least one non-null timestamp.
user_id.timestamp for each user.message_id as the deterministic tie-breaker.user_id, message_id, and timestamp, ordered by user_id.| Column | Type | Description |
|---|---|---|
| user_id | INTEGER | Tinder user who sent the message |
| message_idPK | VARCHAR(12) | Unique identifier for the message |
| timestamp | TIMESTAMPTZ | Timestamp when the message was sent |