Javatpoint Logo
Javatpoint Logo

MySQL AVG() Function

The avg() is a Math function of MySQL. This function is used to get the average value from the given expression.

Syntax

Parameter

aggregate_expression: It is the column name for getting average

table_name: It is the table for getting records.

where condition: It is optional. It is used to get conditional records.

Returns

This function returns the average value from the given expression.

Table:

MySQL Math AVG() Function

Example 1

Output:


MySQL Math AVG() Function

Example 2

Output:


MySQL Math AVG() Function

Example 3

Output:


MySQL Math AVG() Function
Next TopicMySQL Math




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA