SQL Aggregate Functions
SQL Aggregate Functions are used when information like sum of column values, Count of column values , Average etc are required
- Aggregate functions are used in place of column names in the SELECT statement.
Average of all the values in the specified column
Number of selected rows
Highest value in the expression
The smallest value in the specified column.
Total of the values in the numeric expression
List the maximum Account Balance in the Employees Account
SELECT MAX (AccountBalance) FROM EmployeeAccount;
List the average account balance in the Employees Account
SELECT AVG (AccountBalance) FROM EmployeeAccount
LIST SUM of all account balance in the EmployeeAccount
SELECT SUM (AccountBalance) FROM EmployeeAccount