The SQL SUM simply adds up all the value in a set of rows and return the result.
In the other words, SUM function calculate the sum of all the values in particular column.

SUM operator only can use for column whish is content number only like Interger, Float, Double, etc.

The SQL SUM syntax is simple and looks like this:

SELECT SUM ( [COLUMN NAME] ) FROM [TABLE NAME]


EXAMPLE :

We can see with a simple example which is return sum of the scores in the table.

Table GameScores

PlayerNameDepartmentScores
JasonIT3000
IreneIT1500
JaneMarketing1000
DavidMarketing2500
PaulHR2000
JamesHR2000

SQL statement :

SELECT SUM(Scores) FROM GameScores

Result:

SUM(Scores)
12000