Subtotals

Learn how to include subtotals in aggregate queries.

Overview

Another useful technique to analyze data is producing subtotals. Let’s add multiple aggregation levels in the same query.

Consider this query that counts the number of employees in each department and role:

Get hands-on with 1200+ tech skills courses.