Just trying to find the most efficient method in doing this. If you have a look at the date column below, you will find two consecutive groups where the last date of the first group being 2018-01-04 and having a total count of 4 and the second group's last date 2018-01-13 with a total count of 4 as well.
My end goal is to get the latest group or latest number of consecutive days.
EDITED: MY want table would be to show for every distinct account id to display the total count of last seen consecutive days.
For example. account id: 100012345 total_count_consec_days: 400
account id: is unique
total_count_consec_days: latest group of consecutive days for that accountid.
---Date---
2018-01-01
2018-01-02
2018-01-03
2018-01-04
2018-01-10
2018-01-11
2018-01-12
2018-01-13
I am dealing with 4000 unique accounts and they have an average of total 500 dates for each of them. If there are no efficient methods then I am happy to accept any assistance that will get me my end result. PLease help!!
Thanks!