Skip to the content.
< PREVIOUS   NEXT >

SUM, AVG and COUNT FUNTIONS

SUM(), AVG() and COUNT() SYNTAX

SELECT SUM(column_name)
FROM table_name
WHERE condition;


SELECT AVG(column_name)
FROM table_name
WHERE condition;


SELECT COUNT(column_name)
FROM table_name
WHERE condition;

EXAMPLES

Suppose there is a Table name as “HrEmployee” having Age, Attrition, BusinessTravel, DailyRate, Department, DistanceFromHome, Education, EducationField columns, EmployeeNumber, etc as Columns.


During the sum, Null values are ignored



< PREVIOUS   NEXT >

HOME