SQL - Aggregate Functions



In general, aggregation is a consideration of a collection of objects that are bound together as a single entity. SQL provides a set of aggregate functions that perform operations on all the entities of the column of a table considering them as a single unit. Following are the SQL aggregate functions −

Sr.No. Function & Description
1 APPROX_COUNT_DISTINCT()

Returns the approximate number of rows with distinct expression values.

3 CHECKSUM_AGG()

Returns the checksum value.

4 COUNT_BIG()

Returns the count of the number of items or rows selected by the select statement.

6 GROUPING()

Returns whether the specified column expression in a group by list is aggregate or not.

7 GROUPING_ID()

Returns the level of grouping.

10 STDEV()

Returns the statistical standard deviation of the fields (numerical values) in a particular column.

11 STDEVP()

Returns the population standard deviation for the fields (numerical values) in a particular column.

13 VAR()

Returns the statistical standard variance of the fields (numerical values) in a particular column.

14 VARP()

Returns the population standard variance of the fields (numerical values) in a particular column.

Advertisements