Chapter 7Grouping Data

Introduction

In this chapter you will learn how to use the GROUP BY and HAVING clauses to group and filter data.

Keywords

GROUP BY

HAVING

ORDER BY

WHERE

Definitions

GROUP BY clause — Used with aggregate functions to combine groups of records into a single functional record.

HAVING clause — Used with the GROUP BY clause to set conditions on groups of data calculated from aggregate functions.

The GROUP BY Clause

In Chapter 4 we covered the ORDER BY clause, which affects the results of a query by returning records in either descending or ascending order. In this chapter we will be covering the GROUP BY clause, which is used with aggregate functions to combine groups of records into a single record. We briefly mentioned ...

Get SQL for Microsoft Access, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.