data have;
infile datalines dsd;
input Place $ Customer $ Type $;
datalines;
IL,Alex,Gold
FL,Mike,Gold
IL,Mie,Gold
IL,Prince,Silver
FL,Troy,Silver
run;
proc sql;
create table want as
select Place,Type,count(*) as count
from have
group by Place,Type;
quit;
proc summary data=have nway;
class Place CustomerType;
output out=want(drop=_type_ rename=(_freq_=count));
run;
or proc tabulate:
proc tabulate data=have;
class CustomerType Place;
table Place, CustomerType*n;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!