Aggregate functions:
Ø Aggregate
functions are used to perform calculations on a data set to get the single
value from the user defined data.
Uses of Aggregate functions:
Ø It
performs arithmetic operation as well as calculation on set values and returns
a single value.
Ø Aggregate
functions used with the group by clause of the select statement.
Ø Aggregate
functions ignores all null values (Except Count(*).
What are Aggregate functions?
1. Max()
2. Min()
3. Avg()
4. Count()
5. Sum()
Max():
Max() function used to
find the largest value in the selected column.
Syntax:
Example:
Min():
Max() function used to
find the largest value in the selected column.
Syntax:
Example:
Avg():
Avg() function is used to return the average value of
the numeric column.
Syntax:
Example:
Sum():
Sum() function is used to return average value of
the numeric column.
Syntax:
Example:
Example:2
Count():
Count() function is used to return the number of
rows or records in the table.
Syntax:
Example:1
Example:2
No comments:
Post a Comment