Well, I think I understand both of your points now. However, I just want to point out just in case if I did not explain what I need clearly. 1, we cannot create a large dataset, without set the client cohort from previous year, we are going to deal with the complete database for 10 year, so it's not practical; Most importantly, I need the list from a specific year (a, let's 2017) to run the previous year (a-1, 2016) results, but date is changing for each run and should include all the years after the new a-1, 2016 to the year 2019 . 2, Let's say I got 4 millions patients in 2019, create a special list with 3 millions patients in 2019 as list_2019; 3, then use list_2019, run the similar codes, but time from 2018-2019 two years, generate a list 2 millions list_2018; 4, then use list_2018, time from 2017-2019; generate a list 1.5 millions; .... 10, list_2011, date 2010-2019, generate 200K patients. regardless, thank you both for the discussion.
... View more