User's Guide
PART 1. Working with Databases
Aggregate functions display summaries of the values in specified columns. You can also use the GROUP BY clause, HAVING clause, and ORDER BY clause to group and sort the results of queries using aggregate functions, and the UNION operator to combine the results of queries.
This chapter describes how to group and sort query results.
Summarizing query results using aggregate functions
The GROUP BY clause: organizing query results into groups
Thinking about GROUP BY
The HAVING clause: selecting groups of data
The ORDER BY clause: sorting query results
The UNION operation: combining queries
Standards and compatibility