I have a focused question. I am working in long format. One of my variables is called “new_diff_days”, which is the absolute # of days between each participant’s birthday (month and day - not DOB) and the date of each participants HbA1c test from a merged baseline study plus a registry-based data set. Of course, each participant has a numeric ID_number I want to only keep the lowest # of days between each individual participant's birthday and the date of their HbA1c test (“new_diff_days”) for each year (e.g., 2010) that one or many HbA1c tests (HbA1c_mmolmol) was done (“y_status_dato”) during the time period of 2008 to 2020. How would you write code for that?