CACI International's analytics team is reviewing access patterns in a mission operations platform. Write a PostgreSQL query to identify users who logged in on consecutive calendar days.
The query should treat multiple sessions on the same calendar date as one login day. Return only streaks containing at least two consecutive login dates.
session_logs to users to include the user's name.ROW_NUMBER() and date arithmetic to assign each consecutive sequence to a streak.| Column | Type | Description |
|---|---|---|
| user_idPK | INTEGER | Unique user identifier |
| user_name | VARCHAR(100) | User display name |
| Column | Type | Description |
|---|---|---|
| session_idPK | INTEGER | Unique session identifier |
| user_id | INTEGER | User associated with the session |
| login_at | TIMESTAMP | Session start timestamp |