Lke this?
data have;
input caseid event rhythm;
datalines;
1 0 .
1 0 .
1 1 1
2 0 .
2 0 .
2 1 2
3 0 .
3 0 .
3 1 1
;
proc sql;
create table want as
select caseId, event, max(rhythm) as rhythm
from have
group by caseId
order by caseId, event;
quit;
... View more