Supercell's game designers worry that long losing streaks make players quit. They want to look at the players who had it worst.
For each player, find their longest run of consecutive losses (games ordered by played_at, then match_id). Show the 5 players with the longest losing streak, with their player_name.
Expected output
player_id; exactly 5 rowsExample of the shape (made-up values):
| player_id | player_name | longest_losing_streak |
|---|---|---|
| 42 | PixelFox42 | 9 |
Hints, the later steps and the answer come with Pro.
Write your query here. Ctrl + Enter submits.