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;
The 2025 SAS Hackathon Kicks Off on June 11!
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.