Example 5.17.10 Suppose that we need to print a report summarizing the
number of grades given in every course by every instructor. We wish to print
subtotals for every course and then a general total for all courses. This can be
done in SQL using three subqueries (each containing a group by clause) as
follows: