data have;
input ID Variable $;
cards;
1 X
2 X
3 Y
4 X
;
proc sql;
create table want as
select variable, count(variable)as count
from have
group by variable;
quit;
Register Today!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.