By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Records: 10 Duplicates: 0 Warnings: 0
| Date | streak | last_date |
|---|---|---|
| 2018-10-01 | 1 | 2018-10-01 |
| 2018-10-02 | 2 | 2018-10-02 |
| 2018-10-03 | 3 | 2018-10-03 |
| 2018-10-04 | 4 | 2018-10-04 |
| 2018-10-10 | 1 | 2018-10-10 |
| 2018-10-15 | 1 | 2018-10-15 |
| 2018-10-16 | 1 | 2018-10-16 |
| 2018-10-18 | 1 | 2018-10-18 |
| 2018-10-19 | 2 | 2018-10-19 |
| 2018-10-20 | 3 | 2018-10-20 |
| Date | streak |
|---|---|
| 2018-10-20 | 3 |