I have very limited understanding of Proc SQl and hoping if someone an help me out here with this code. This is a summary table code.
proc sql ;
create table cnts as
select 1 as ord, trt01an, trt01a, count (distinct USUBJID ) as cnt
from ads_1 where enrlfl ="Y" group by trt01an, trt01a
union
select 2 as ord, trt01an, trt01a, count( distinct usubjid) as cnt
from ads_1 where QFELOEYE ne "N/A" group by trt01an, trt01a
union
select 3 as ord, trt01an, trt01a, count( distinct usubjid) as cnt
from ads_1 where QFELOEYE = "N/A" group by trt01an, trt01a
union
select 6 as ord, trt01an, trt01a, count( distinct usubjid) as cnt
from ads_1 where saffl ="Y" group by trt01an, trt01a ;
quit;