SUM

SQL SUM Function

The SUM function returns the sum of all values from the select. Null values are ignored.

SQL SUM syntax

SELECT SUM(column_name)
FROM table_name;

Training_Course

ID NAME DURATION PRICE
1 SQL 5 200
2 T-SQL 7 700
3 MySQL 5 600
4 PL/SQL 7 800
5 PostgreSQL 6 500

Example

select SUM(PRICE) from Training_Course;

Results

2800