I have a MySQL table that shows the following:
ID DATE FREQUENCY
-- ---------- ---------
1 2017-08-01 1
2 2017-08-02 1
3 2017-08-03 0
4 2017-08-04 1
5 2017-08-05 1
6 2017-08-06 1
I am trying to get the easiest way to group every time there are consecutive 1's on the frequency column. Then I would like to display them.
Example
2 (There are 2 consecutive 1's)
3 (There are also 3 consecutive 1's)
Thank you