In this chapter you will learn:
About function Avg ()
Syntax of function Avg ()
Example of function Avg ()
About function avg()
SQL function Avg () is an aggregate function which is used to retrieve the value of columns after calculating its average. It returns average of numeric expression, either all or distinct. This functions helps when user want to know the average of the specific column of the table.
Syntax of function Avg ()
SELECT Avg(column_name) from table_name
Example of function Avg ()
select 'Average Rate'=avg(rate) from humanresources.employeepayhistory
SUMMARY
In this chapter, you have learned about function Avg () with an example. We think that now you can use this function easily so now in the next chapter you will learn about function count ().