Given a user activity table, write a query to find consecutive days of logins.
Treat multiple logins by the same user on one calendar date as a single login day. Return only streaks containing at least two consecutive calendar days.
user_id, streak_start, streak_end, and consecutive_days.user_id, then streak_start ascending.| Column | Type | Description |
|---|---|---|
| activity_idPK | INT | Unique activity event identifier |
| user_id | INT | Identifier of the user who logged in |
| login_at | TIMESTAMP | Timestamp when the login activity occurred |