The SUM() returns the sum of a numeric column.
Syntax:-
SELECT SUM(column_name) FROM table_name;
Example:-
The subsequent SQL finds the sum of all the “Visits” fields for the “VisitNumbers” table:-

SELECT SUM(Visits) AS TotalVisitNumbers FROM VisitNumbers;

 

Categories: SQL Function

0 thoughts on “SQL Sum()”

Leave a Reply