Customer_Id Call_Date Agent_M_Code Row_Indicator
810471698 2020-03-19 13:25:24.910 rmanzan2 1
810471698 2020-03-22 20:28:19.067 pmaclair 2
810471698 2020-03-24 09:22:47.833 njeanle 3
810471698 2020-03-24 12:36:29.367 edelaro4 4
810471698 2020-03-29 22:36:29.762 kdularo7 1
810471698 2020-04-11 11:21:11.243 rbustam1 1
810471698 2020-04-11 17:50:41.023 frenteri 2
810471698 2020-05-10 11:16:21.683 cschuch2 1
810471698 2020-05-13 15:26:40.660 gledesma 2
810471698 2020-07-03 11:26:20.697 cmataver 1
810471698 2020-07-22 14:19:53.450 irodri13 1
For the above table I need to generate the row_indicators but the condition here is... if the above Call_Date and below call_Date in between 10 Days then we need to generate the row_indicator in sequence i.e, (1,2,3,4..) if not again we need to start with 1.
For Example: In the above example table the first four rows are in between 10 days (Less than or equal to 240 Hrs) then for the first four rows the row_indicators are 1,2,3,4 and again from the fifth row the Call_Date is started from 1 because the fifth row date is not falling in the 10 days Call_Date range.