Returns the smallest value in a given column
Returns the largest value in a given column
Returns the sum of the numeric values in a given column
Returns the average value of a given column
Returns the total number of values in a given column
Returns the number of rows in a table In database management system an aggregate function is a function where the values of multiple rows are grouped together as input and on certain criteria to form a single value. Aggregate functions are used to compute against a numeric column data from SELECT statement. This mostly summarize the results of a particular column of selected data.
SELECT AVG (MARKS) FROM STUDENTS;
This statement will return a single result which contains the average value of everything returned in the Marks column from the Students table. SELECT AVG (SALARY) FROM EMPLOYEE WHERE TITLE=’AVP’; This statement will return the average salary for all employee whose title is equal to AVP. SELECT COUNT (*) FROM STUDENTS;
This statement returns the total number of students. However you can also add additional column or distinct values counts.
SELECT COUNT (DISTINCT TITLE) FROM EMPLOYEE;