MariaDB AVG() FunctionMariaDB AVG() function is used to retrieve the average value of an expression. Syntax: Or Example: AVG() Function with single expressionWe have a table "Employee2", having the following data: Let's retrieve the average salary of the employees from the table. Output: Use AVG() Function with FormulaYou can use AVG() function also with mathematical formula. For example, if you want to increase the average salary of your employees by 50%, you can use the following formula to estimate the cost: Output: It will increase the salary by 50%. AVG() Salary with ORDER BY ClauseOutput:
Next TopicMariaDB Inner Join
|