I have a table with statistic of games which has next rows (I only write about rows that has interest in this context):
id BIGINT PRIMARY KEY
date TIMESTAMP WITH TIME ZONE
status VARCHAR -- 'WON' or 'LOSE'
player_id BIGINT -- FOREIGN KEY
I need to write a query that select number of consecutive win games (status = 'WON') by some user (user_id = %some id%).