I assume that what you want is to take the obs with the minimum value for each name? If you want to do so with PROC SQL, this has nothing to do with first./last. logic, which is a SAS Data Step concept.
proc sql;
create table want as
select * from sam
group by name
having value=min(value);
quit;