Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

SQL Aggregate Functions

SQL Aggregate Functions

Aggregate functions operate by computing a calculation over a set of values and produce a singular result.

Frequently employed in conjunction with the GROUP BY clause within the SELECT statement, this clause partitions the result-set into distinct groups, enabling the aggregate function to furnish a solitary value for each group.

The predominant SQL aggregate functions encompass:

  • MIN(): Retrieves the smallest value from the specified column.
  • MAX(): Fetches the largest value from the specified column.
  • COUNT(): Calculates the row count within a dataset.
  • SUM(): Computes the cumulative sum of a numerical column.
  • AVG(): Determines the average value of a numerical column.

Aggregate functions disregard null values, with the exception of COUNT().

We’ll delve into the details of the aforementioned aggregate functions in the subsequent chapters.