O'Reilly logo

Joe Celko's SQL for Smarties, 5th Edition by Joe Celko

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 23

Basic Aggregate Functions

Abstract

An aggregate function reduces a set of values to a single value. Some of the basic ones are built into SQL, and they are usually fast because optimizers and index structures often store this data for their own use.

Keywords

SUM()

AVG()

MAX()

MIN()

COUNT()

COUNT(*)

Cardinality

ALL

DISTINCT

An aggregate function reduces a set of values to a single value. Some of the basic ones are built into SQL, and they are usually fast because optimizers and index structures often store this data for their own use. The original functions are SUM(), AVG(), MAX(), MIN(), COUNT(), and COUNT(*).

Simple aggregate functions first construct a set of values as defined by the parameter. The parameter is usually a single ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required