SQL Functions
Min, Max, Count, Avg, Sum.
SQL Aggregate Functions
SQL has many built-in functions for performing calculations on data.
Aggregate Functions
Aggregate functions return a single value, calculated from values in a column.
MIN()- returns the smallest valueMAX()- returns the largest valueCOUNT()- returns the number of rowsSUM()- returns the total sum of a numeric columnAVG()- returns the average value of a numeric column
MIN() Syntax
SELECT MIN(column_name)
FROM table_name
WHERE condition;
MAX() Syntax
SELECT MAX(column_name)
FROM table_name
WHERE condition;
COUNT(), AVG(), SUM() Syntax
SELECT COUNT(column_name)
FROM table_name
WHERE condition;