Simply write sum followed by the variable name.
proc print data=test;
sum salary;
run;
Simply mention the sum followed by the variable names.
proc print data=test;
sum salary rating;
run;
proc print data=work.test;
by post;
sum salary;
run;
proc print data=work.test;
sum salary;
by post;
run;
proc print data=work.test;
by descending post;
sum salary;
run;
Sorting in descending order
proc sort data=work.test;
by descending post;
run;
proc print data=work.test;
by descending post;
sum salary;
run;