data have;
input qy $ 1-8 balance;
datalines;
2010 Q1 10
2010 Q1 10
2010 Q1 10
2010 Q2 20
2010 Q2 20
2010 Q3 20
2010 Q4 50
2011 Q1 100
2011 Q2 200
2011 Q3 300
;
run;
proc sql;
create table want as
select qy, balance, sum(balance) as sum_balance
from have
group by qy;
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.