Hi all,
I am trying to find which previousrepcode has moved to paying accountstatus from the below sample table. I want to get a table which shows the count of how many 122, 168, 157, etc repcodes are in the paying accountstatus. I am confused to use the proc freq to get this information or proc sql. I have used the below code and this gives me information about the previousrepcode and paying_repcode. I want to count how many times 168, 122 etc are in paying. Thanks
AccountNumber PreviousRepCode nextstatus dt_curbal DateAccountMoved Sector accountstatus
321784639 122 005H 145.55 02-Nov-22 Comms Review
272652868 168 005H 60.72 03-Nov-22 Utilities Paying
250411519 168 005H 47.09 03-Nov-22 Comms Review
340751155 122 005H 1186.47 03-Nov-22 Comms End of cyle
291453173 157 005H 889.12 03-Nov-22 Financial Paying
proc sql;
create table Paying_info as
select
PreviousRepCode,
accountstatus as Paying_repcodes
from out_trace_op_status
where accountstatus like 'Paying';
quit;