12. Aggregate Functions

Used to perform calculations on set of values and return a single value as result.
  1. Count(): Count number of rows in a table that meet a certain condition. E.g. SELECT COUNT (*) From Employees;
  2. SUM(): Calculate sum of all the values in a column. E.g. SELECT SUM(salary) FROM Employees;
  3. AVG(): Calculate average of all the values in a column. E.g. SELECT AVG(salary) FROM Employees;
  4. MAX(): Find the maximum value in a column. E.g. SELECT MAX(salary) FROM Employees;
  5. MIN(): Find the minimum value in a column. E.g. SELECT MIN(salary) FROM Employees;

Comments