which produces exactly the same result. Note that after the number of grades
for the first two groups are reported in the first two detail rows a blank is printed
for the empno of the third row; this is the rollup way of indicating that this
row contains the subtotal number of grades for the course cs110. A new detail
row follows for cs210 and, since this course is taught only by the employee 019,
the next row contains a subtotal for this course, etc. Finally, the last row, with
blank for the first two columns is the total number of grades for all courses.
We conclude that the rollup extension of group by generates subtotals in
increasing order of aggregation until all expressions in the group by clause are
“rolled up”.