Aggregate Functions
This page is specific to: Version:SQL Server 2000
Transact-SQL Reference (SQL Server 2000)
Aggregate Functions

Aggregate functions perform a calculation on a set of values and return a single value. With the exception of COUNT, aggregate functions ignore null values. Aggregate functions are often used with the GROUP BY clause of the SELECT statement.

All aggregate functions are deterministic; they return the same value any time they are called with a given set of input values. For more information about function determinism, see Deterministic and Nondeterministic Functions.

Aggregate functions are allowed as expressions only in:

  • The select list of a SELECT statement (either a subquery or an outer query).

  • A COMPUTE or COMPUTE BY clause.

  • A HAVING clause.

The Transact-SQL programming language provides these aggregate functions:

AVG MAX
BINARY_CHECKSUM MIN
CHECKSUM SUM
CHECKSUM_AGG STDEV
COUNT STDEVP
COUNT_BIG VAR
GROUPING VARP

See Also

Functions

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View