Aggregate Functions in SQL-

aggregate function

Aggregate Functions in SQL-

In SQL all data saved in tabular format, The aggregate functions are used for calculating a particular factor directly with use of aggregate functions. The aggregate functions are in-build functions that are used for calculating or manipulating different task. The aggregate functions are easy to use and manipulation different operations on database.

The different aggregate functions as fallows-

1) Count( )
2) Sum( )
3) Avg( )
4) Min( )
5) Max( )

We discuss each aggregate function i detail as fallows-agrigate

1. Count ()-
The count function is used for calculating a particular records or all records numbers from table.
Count(*)-Display all number of records from the table.
Count(salary)- Display all number of records of salary.

2. Sum( )-
The sum function are used for display a sum of particular columns from table. The sum calculating addition of given column name.
Sum(Salary)-Display total addition of salary column.
OUTPUT- 60000

3. Avg( )-
It display average of particular column.
Avg(salary)-Display Average of salary column.
OUTPUT- 12000

4. Min( )РDisplay a minimum value  from that column.


OUTPUT- 3000


5. Max( )Display a maximum value  from that column.


OUTPUT- 20000

Leave a Reply