功能(聚合)

在資料庫管理中,聚合函式是一種函式,其中多行的值被組合在一起作為某些標準的輸入,以形成更重要的含義或測量的單個值,例如集合,包或列表。

MIN        returns the smallest value in a given column
MAX        returns the largest value in a given column
SUM        returns the sum of the numeric values in a given column
AVG        returns the average value of a given column
COUNT      returns the total number of values in a given column
COUNT(*)   returns the number of rows in a table
GROUPING   Is a column or an expression that contains a column in a GROUP BY clause.
STDEV      returns the statistical standard deviation of all values in the specified expression.
STDEVP     returns the statistical standard deviation for the population for all values in the specified expression.
VAR        returns the statistical variance of all values in the specified expression. may be followed by the OVER clause.
VARP       returns the statistical variance for the population for all values in the specified expression.

聚合函式用於計算 SELECT 語句中返回的數值資料列。它們基本上總結了特定選定資料列的結果。 - SQLCourse2.com

所有聚合函式都忽略 NULL 值。