MySQL SUM function

mysql 5.7

MySQL SUM function The SUM() function returns the total sum of a numeric column. The SUM() function is an aggregate function that allows you to calculate the sum of a set of values or an expression. Syntax for SUM function would be as below: SELECT SUM(column_name) FROM table_name WHERE condition; You can also use distinct value while sum function SELECT SUM(distinct column_name) FROM table_name WHERE condition; If … Read more