proc sql; create table want as select client_id,count(distinct transactions) as tot_trans from have group by client_id order by client_id; quit; If your data is very big then the above code will take much time as i have included count(distinct transactions)...so SQL processor has to make two passes through the data in order to eliminate the duplicates... In that case, just try with following one... proc sql; create table want as select distinct client_id, transactions from have; quit; proc freq data = want noprint; table client_id / out = want(drop = percent); run; Choice is yours based on the size of data... -Urvish
... View more