MySQL Addition returns you the sum value of a specific column for a group in a table. The Aggregate function sum() is used to perform the addition in SQL Query. We can make use of Aggregate function with group by and order by clause.
Returns the sum of the values of the column column_name. If there are no rows then SUM() returns NULL. The DISTINCT keyword can be used to sum only the distinct values of the column.
Understand with Example
The Tutorial illustrates an example of 'MySQL Addition'. To understand the example we have a table employee in the database. The select order by query is used to sort the records by specific column. In this example we sort the records of name and salary on the basis of salary column from table 'employee'.
In this example, the sum() function is used to calculate sum of salary of all employees in a table 'employee'.