Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Javatpoint Logo
Javatpoint Logo

MariaDB SUM Function

MariaDB SUM function is used to return the summed value of an expression.

Syntax:


SUM () Function with Single Expression

Example:

Calculate the total salary of the "Student" table where "student_id" is greater than 1.

Output:

MariaDB Sum function 1

SUM () Function with DISTINCT Clause

You can use DISTINCT clause with SUM function to avoid duplicate values summation.

Example:

Output:

MariaDB Sum function 2





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA