MariaDB SUM Function

In MariaDB, the SUM Function is used when we need to sum the values of an expression. The SUM() function in MariaDB is an Aggregate Function that calculates the sum of values in a specified column. The SUM Function takes a set of values and returns the sum, it ignores NULL values as the AVG() Function does.

Syntax:

SELECT SUM(expression)
FROM TABLE
WHERE [CONDITION];

MariaDB SUM() Function

MariaDB is an open-source database that comes under the Relational DataBase Management System(RDBMS). It was bought by Oracle in 2009. MariaDB is highly Compatible with MySQL. It offers exceptional performance and scalability which is optimized for the performance and efficient handling of large data volumes.

MariaDB can run on various Operating Systems like Windows, Linux, and MacOS. In this article, we will learn about the SUM Function in detail along with their examples, and perform various queries using various Functions Like GROUP BY, HAVING, and DISTINCT Clause.

Similar Reads

MariaDB SUM Function

In MariaDB, the SUM Function is used when we need to sum the values of an expression. The SUM() function in MariaDB is an Aggregate Function that calculates the sum of values in a specified column. The SUM Function takes a set of values and returns the sum, it ignores NULL values as the AVG() Function does....

Examples of MariaDB SUM Function

To understand the SUM function better, we need some tables on which we will perform various queries and operations. Here we will create a table called Employees which consist of EMPID, EMPNAME, EMPSALARY as Columns....

Conclusion

Generally we use SUM( ) operator to retrieve addition data from data table. Most of the situations this operator is used in Data Extraction and Data Analysing. It’s highly adaptable, used for basic sums, unique value sums (with DISTINCT), grouped sums (with GROUP BY), and conditional sums (with HAVING)....

Contact Us