Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
GROUP BY – Recap
Summary
19. Exercise 1

Instruction

Great! For this quiz, we're going to use a simple table:

department_cost(department, year, total_cost)

It shows the overall cost of running a given department in a given year. The cost is expressed in thousands of dollars.

Exercise

Show the sum of the total_cost for each department and year; the total sum of total_cost for each department across all years; and the grand total of total_cost across all departments and years.

Show the following columns: department, year, and the sum of total_cost (as total).