Export (0) Print
Expand All

Avg

SQL Server 2000

Avg

Returns the average value of a numeric expression evaluated over a set.

Syntax

Avg(«Set»[, «Numeric Expression»])

Remarks

This function requires an implicit count of the number of cells, not including empty cells. In order to force the inclusion of empty cells, the application must use the CoalesceEmpty function. For more information about empty cells, see the OLE DB documentation.

Example

The following function returns 2000 if respective Sales are 1000, 2000, and 3000:

Avg({USA, Canada, Mexico}, Sales)
Show:
© 2014 Microsoft