Sql 简明教程
SQL - Aggregate Functions
一般来说,聚合是将一组对象作为一个整体联系在一起进行考虑。SQL 提供了一组聚合函数,对数据表的列的所有实体执行操作,并将其视为一个单元。以下是 SQL 聚合函数−
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. |