Find each user's longest streak of consecutive login days (ignore duplicate logins on the same day). Return user_id and longest_streak.
6 rows with columns user_id, longest_streak — first 3 shown:
| # | ||
|---|---|---|
| 1 | 1 | 5 |
| 2 | 2 | 1 |
| 3 | 3 | 5 |
Run your code to see the output here.