Recall that when you
specify one column as the argument to an aggregate function, the values
in that column are calculated. When you specify multiple columns,
the values in each row of the columns are calculated. This solution
uses the SUM function to calculate the sum of each month's sales,
and then uses the SUM function a second time to total the monthly
sums into one grand total.
sum(calculated JanTotal, calculated FebTotal,
calculated MarTotal) as GrandTotal format=dollar10.
An alternative way to
code the grand total calculation is to use nested functions:
sum(sum(January), sum(February), sum(March))
as GrandTotal format=dollar10.