Hello , please can anyone help me ,how to find max occurrence of flag Y without interruption which in the case below would be 3. thanks
id date flag
834 01-01-18 Y
834 01-02-18 Y
834 01-03-18 Y
834 01-04-18 N
834 01-05-18 N
834 01-06-18 Y
834 01-07-18 Y
834 01-08-18 N