And SQL without a CREATE TABLE somewhat functions as a PRINT procedure as well.
Note that in the first case there are ties - there are two people with the smallest value. The sort methodology would not account for ties.
proc sql;
*Youngest age - note that there are ties here! How would you want to handle that;
title 'Youngest person - note ties';
select *
from sashelp.class
having age=min(age);
quit;
proc sql;
title 'Oldest person - no ties';
select * from sashelp.class
having age=max(age);
quit;
... View more