For each login (distinct user and date), return user_id, login_date and gap_days since that user's previous login.
25 rows with columns user_id, login_date, gap_days — first 3 shown:
| # | |||
|---|---|---|---|
| 1 | 3 | 2025-01-02 | NULL |
| 2 | 3 | 2025-01-03 | 1 |
| 3 | 3 | 2025-01-04 | 1 |
Run your code to see the output here.