loan_number date_component
2542 2020121604 2020-12-19
2544 2020121604 2020-12-19
2548 2020121604 2020-12-19
2557 2020121607 2020-12-19
2560 2020121607 2020-12-19
2563 2020121607 2020-12-19
I have data of loan numbers in the range of date (2020-12-18 & 2020-12-28) and some of the loan numbers are repeating in these dates.
I want the unique count of loan number from each date and taking into account the fact that the loan number is unique and has not occurred in the previous dates.
Example - if the 19th of the month has 3 unique loan-id and 20th of the same month has 2 unique loan-id then these 2 loan id's should be unique from the ones in 19th.