
The following are the most commonly used SQL aggregate functions:
AVG
The AVG () function returns the average value of a numeric column.
SYNTAX

EXAMPLE
Let’s consider a demo database and table.


Figure 29.2. AGGREGATE QUERY & OUTPUT
Figure 29.1. Select * from SalaryInfo;
COUNT
The COUNT () function counts the number of rows that matches a specified condition.
SYNTAX

EXAMPLE

Figure 29.3. COUNT QUERY & OUTPUT
MIN
The MIN () function returns the smallest value of the selected column.
SYNTAX

EXAMPLE

Figure 29.4. MIN QUERY & OUTPUT
MAX
The MAX () function returns the smallest value of the selected column.
SYNTAX

EXAMPLE

Figure 29.5. MAX QUERY & OUTPUT
Want More SQL Deep Dives