

In the second step, we will divide the total expense amount to 7 because this collection is formed on 7 members. At first, we will add up all the expenses for the aforementioned week. Now, we will calculate the last week’s average expense of John. The following chart and table represent John’s last week’s expenses. John is a student at university and decides to record his expenses every day. Let’s explain this mathematical notion with a straightforward example. As a result, the obtained number will be the average. Firstly, we add up all members of the collection and then divide the total member number of the collection. In this article, we will learn the SQL Average function which is known as AVG() function in T-SQL.ĪVG() function is an aggregate function that calculates the average value of a numerical datasetĪssume that we have a collection of numbers.
