What are SQL Functions?
SQL functions perform calculations on data and return a result.
COUNT()
SUM()
AVG()
MIN()
MAX()
COUNT()
- Returns the total number of rows.
SELECT COUNT(*)
FROM Employee;
SUM()
- Returns total value of a numeric column.
SELECT SUM(Salary)
FROM Employee;
AVG()
- Returns the average value.
SELECT AVG(Salary)
FROM Employee;
MIN()
- Returns the smallest value.
SELECT MIN(Salary)
FROM Employee;
MAX()
- Returns the largest value.
SELECT MAX(Salary)
FROM Employee;
Top comments (0)