AVG Function
It is an aggregate function that returns the average of the resultant column values in decimal. It also allows two optional parameters ALL and DISTINCT, where ALL is the default parameter when any of these are not passed.
- ALL: This is the default parameter. If this parameter is used then duplicate values are also considered for computing average.
- DISTINCT: If this parameter is used then duplicate values are not considered for computing average.
MariaDB AVG Function
MariaDB is an open-source relational database management system that is a of MySQL and is based on SQL(Structured query language). It is an improved version of MySQL and has various features, security, and performance when compared to MySQL.
The MariaDB AVG function is used to calculate the average of values present in the column. The average returned is a decimal value. It can also remove duplicate values before computing the average.
Syntax:
AVG ( [ALL | DISTINCT] expr )