Longest Winning Streak
Hard
Gaps and Islands
For each player return the longest streak of consecutive wins ('W'). Matches are ordered by match_day. Order by player_id.
Table schema
Matches(player_id INT, match_day INT, result CHAR(1))Sample data
player_id | match_day | result
1 | 1 | W
1 | 2 | W
1 | 3 | L
1 | 4 | W
1 | 5 | W
1 | 6 | W
2 | 1 | L
2 | 2 | W
2 | 3 | W
2 | 4 | L
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.