I want to change this code that will fill a variable with the ID corresponding to a minimum age. Because in case we have more than one ID with the same minimum age, I would like to bring the minimum ID (containing the minimum age) for the variable ID_AGE_MIN.
proc sql;
create table want as
select *, (select id from have having min(age)=age) as id_min_age
from have;
quit;