Contents

## SQL AVG() Function

The SQL AVG() function works with a bunch of rows of a column in a table and finds the average of it.

## SQL AVG() Syntax

select AVG(*column_name*)

from *table_name*

where *condition*;

## SQL AVG() Example

Let us say we want to find the average *tprice *in the table.

SQL AVG(): How to find the average in SQL |

So, Let us calculate the average of the *tprice *column first, then we will try to find that with the query.

Average of tprice = (9800 + 19800 + 29800 + 2800 + 10800)/5 = 14600

Now, let us find by SQL Query,

select

**avg**(tprice)from sqldemo.test_tab_t;

SQL AVG(): How to find the average in SQL? |

Aslo see: Oracle Aggregate Functions: MAX, MIN, COUNT, SUM, AVG Examples

### What we learned about SQL AVG() function?

We learned that the

**SQL AVG() function**finds the average of all the values in a column of a table. It takes column name or expression as an input parameter.
## Your turn now. Please share your questions or feedback. :-)