SAS coding fun - another solution
Yesterday's fun SAS code has another solution, this time using Proc SQL.
data practice_dates;
input id date mmddyy8. test passed $;
format date mmddyy10.;
datalines;
1234 01021969 2345 Y
1234 01301969 3456 N
3157 02031969 2345 N
3157 02201969 2897 N
3157 04151969 2345 Y
1011 02051969 2345 N
1011 02211969 2345 N
1011 05201969 2897 N
2468 03211969 2234 Y
2468 07151969 2255 Y
;
proc sort data=practice_dates;
by id date;
run;
proc sql;
select *
from practice_dates
where id in (select distinct id
from practice_dates
where passed = 'Y')
;
quit;


Reader Comments