Have to us SQL ? data have;
input Client transactions ;
cards;
1 5
1 5
1 2
1 3
2 9
2 3
2 12
2 1
;
run;
ods _all_ close;
ods output SQL_Results=temp;
proc sql number;
select * from have;
run;
proc sql;
create table want as
select *,(select sum(transactions) from temp where row le a.row) as cum from temp as a;
quit;
ods listing;
Xia Keshan
... View more