10. Aggregate Functions
Overview
In this chapter, we'll use SQL aggregate functions and solve problems with them. By the end of this chapter, you'll be able to use SQL aggregate functions and the GROUP BY clause, implement the SQL HAVING clause, explain the differences between the HAVING and WHERE clauses, use the SQL OVER and PARTITION BY clauses, and implement the RANK and DENSE_RANK functions.
Introduction
In the previous chapters, we saw that the WHERE clause can be used to filter SQL query result sets in an efficient, almost intuitive way. For example, say we want to identify the total number of executives in a department, or we want the total number of dependents who are covered by a medical claim. In such cases, more than the details, ...
Get The SQL Workshop now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.