Consistency is key to fitness. Peloton wants to reward its most dedicated users. A workout streak is defined as a series of consecutive days where the user completed at least one workout session.
Write an SQL query to find all user_ids who have achieved a workout streak of 10 days or more.
| user_id(INTEGER) | workout_date(TIMESTAMP) |
|---|---|
| 1 | 2026-01-01 08:00:00 |
| 1 | 2026-01-02 09:00:00 |
| 1 | 2026-01-03 10:00:00 |
| 1 | 2026-01-04 07:00:00 |
| 1 | 2026-01-05 08:00:00 |
| 1 | 2026-01-06 09:00:00 |
| 1 | 2026-01-07 10:00:00 |
| 1 | 2026-01-08 11:00:00 |
| 1 | 2026-01-09 12:00:00 |
| 1 | 2026-01-10 08:00:00 |
| 2 | 2026-01-01 08:00:00 |
| 2 | 2026-01-03 08:00:00 |
| user_id(INTEGER) |
|---|
| 1 |