AVG COUNT MAX MIN SUM Functions in SQL

For Complete YouTube Video: Click Here

In this class, we will understand AVG COUNT MAX MIN SUM Functions in SQL.

We have already discussed the concepts of NVL function in SQL.

AVG COUNT MAX MIN SUM Functions in SQL

So far, all the number functions that we have discussed are single-value functions.

In this class, we will discuss the Aggregate value functions.

Aggregate functions are the functions that work on a list of values.

To understand this, we will consider the table below.

AVG COUNT MAX MIN SUM Functions in SQL 1
AVG COUNT MAX MIN SUM Functions in SQL 1

We will find the Average, Count, Maximum, Minimum, Sum functions on the above table.

AVG: To find the average on the list of values.

COUNT: To count the number of rows. COUNT will not calculate the NULL values.

MAX: To find the maximum value from the list of values.

MIN: To find the minimum value from the list of values.

SUM: To find the SUM of all the values.

The output of all the aggregate functions is as shown below.

AVG COUNT MAX MIN SUM Functions in SQL 2
AVG COUNT MAX MIN SUM Functions 2