The AVG() Function
Swipe to show menu
AVG() returns the average value of a certain column.
Let's see an example:
12SELECT AVG(population) FROM country;
AVG() can also be used to find the average of a selected set of columns or rows that meet certain conditions. Hereβs an example:
123SELECT AVG(population) FROM country WHERE population < 4478500;
1. What does the AVG() function return in SQL?
2. Which SQL clause can be used with AVG() to calculate the average for a subset of rows?
Everything was clear?
Thanks for your feedback!
SectionΒ 5. ChapterΒ 1
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
SectionΒ 5. ChapterΒ 1