People
Companies
Institutions
Jobs
Q&A
News
AI Dasatoo
Log in
Home
Courses
Tutors
Books
Q&A
Ask and answer questions to make information more available to wider audiences.
Tags
Latest
Ask Question
Nolan Lovechic
@
nolanlovechic
19, Jul 2023 12:00 AM
AVG() function
What is the usage of AVG() function in MariaDB database?
answers
2
Answer 1
Ethan Barbrow
@
ethanbarbrow
09, Aug 2023 03:25 PM
Or
SELECT expression1, expression2, ... expression_n,
AVG (aggregate_expression)
FROM tables
[WHERE conditions]
GROUP BY expression1, expression2, ... expression_n;
Answer 2
Ethan Barbrow
@
ethanbarbrow
09, Aug 2023 03:25 PM
MariaDB AVG() function is used to retrieve the average value of an expression.
AVG() returns NULL if there were no matching rows.
Syntax:
SELECT AVG(aggregate_expression)
FROM tables
[WHERE conditions];