Chapter 9. SELECT Statement: SELECT Clause and Aggregation Functions

Introduction

The WHERE clause described in the previous chapter selects rows. The intermediate result from this clause forms a horizontal subset of a table. In contrast, the SELECT clause selects only columns and not rows; the result forms a vertical subset of a table.

The features, limitations, and use of the SELECT clause depend on the presence or absence of a GROUP BY clause. This chapter discusses table expressions without a GROUP BY clause. In Chapter 10, “SELECT Statement: The GROUP BY Clause,” which concentrates on the GROUP BY clause, we discuss the features of the SELECT clause when the table expression does contain a GROUP BY clause.

A large part of this chapter is devoted ...

Get Introduction to SQL: Mastering the Relational Database Language, Fourth Edition/20th Anniversary Edition 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.