SAS proc sql has a facility called re-merging that allows you to do this in one step:
proc sql;
select id, start, min(start)
from t
group by id;
run;
SAS recognizes a group by where not all the non-aggregated columns are included in the group by
clause. In this case, it returns each row in the original data set, with the aggregation function min(start)
aggregated according to id
(because it is in the group by
) clause.