Skip to Main Content
The SQL Workshop
book

The SQL Workshop

by Frank Solomon, Rakesh Kumar Pandey, Shubham Jain, Prashanth Jayaram, Awni Al Saqqa, Fiodar Sazanavets, Aaditya Pokkunuri, Shashikant Shakya, Dixit Patel, Pradeep Kumar Gupta, Scott Cosentino
December 2019
Beginner content levelBeginner
288 pages
4h 48m
English
Packt Publishing
Content preview from The SQL Workshop

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, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SQL for Business Users

SQL for Business Users

O'Reilly Media, Inc.
SQL Antipatterns

SQL Antipatterns

Bill Karwin

Publisher Resources

ISBN: 9781838642358Supplemental Content