I am trying to create a table of sums by different categories. here is the proc means step:
proc means data=error.state_data sum;
var projpaid_1 projpaid_2;
by program state;
run;
so this gives me the sums of projpaid_1 and projpaid_2 by state and program. I want to do the same in sas sql but cant finish the code. here is what i have:
proc sql;
create table state_totals as
select sum (projpaid_1) as TOTAL_1,
sum(projpaid_1) as TOTAL_2
from error.state_data
group by state and program;
quit;
but it just gives me the totals of all projpaid_1 and projpaid_2, not by state and program category. How can i amend this?