Write a SQL query using window functions to identify users who have sent emails on consecutive days.
Treat multiple emails from the same user on one calendar date as a single sending day. Exclude records with a missing user or timestamp.
user_id, previous_sent_date, sent_date, and days_betweenuser_id, then sent_date ascending| Column | Type | Description |
|---|---|---|
| event_idPK | INT | Unique email event identifier |
| user_id | INT | Identifier of the user who sent the email |
| sent_at | TIMESTAMP | Timestamp when the email was sent |