The SUM statement alone sums the values of Expenses and Revenues for
the entire data set. Because the PROC PRINT step contains a BY statement,
the SUM statement also sums the values of Expenses and Revenues for each region
that contains more than one observation.
sum expenses revenues;
by region;