As per requirement we want to count number of repeat case in the bucket of 7 days. Case appearing in the first 7 days will be counted only 1, case appearing in after 7 days will go into next bucket.
Here in Example A’s Case count is 3 because 7days bucket available are there is 3. First bucket is 1-7 Jan, Next one of 8-14 Jan and last 15-21 Jan.
Image attached for reference.
What will be approach for get this type solution.