Italian Trulli

SQL Average function With Example

Test Tribe
.
Average Function In SQL - How to Use Function in SQL?

Average Function in SQL with example



Avg()
The average function is used to display the average value of the Numeric column in SQL
NOTE- the AVG()function column should be numeric.

Syntax of AVG Function
The Basic Syntax For Average Functions Are given Below

Average function Without Condition

SELECT AVG(column_name)FROM table_name;

Average function With Condition

SELECT AVG(column_name)FROM table_name WHERE condition;


Example of Average Function

SQL Query-
SELECT AVG(Marks)FROM Student;

In the Above Example, It Will Display The Total Average Of Marks Column in the Student Table.


Hope !!! The above Tutorial on Average with Examples is helpful For you...

Team,
QA acharya

Post a Comment

0 Comments