IdeasCuriosas - Every Question Deserves an Answer Logo

In Computers and Technology / College | 2025-07-05

Which SQL function calculates the average of a numeric column?

MIN()

SUM()

MAX()

AVG()

Asked by lakshay9574

Answer (1)

The question asks to identify the SQL function that calculates the average of a numeric column.
MIN() returns the minimum value, SUM() returns the sum, and MAX() returns the maximum value.
AVG() calculates the average of a numeric column.
Therefore, the answer is A V G ( ) ​ .

Explanation

Understanding the Question The question asks us to identify the SQL function that is used to calculate the average of a numeric column. We are given four options: MIN(), SUM(), MAX(), and AVG(). We need to determine which of these functions performs the averaging operation.

Analyzing the Options Let's analyze each option:



MIN() : This function returns the smallest value in the specified column.
SUM() : This function calculates the sum of all values in the specified column.
MAX() : This function returns the largest value in the specified column.
AVG() : This function calculates the average of all values in the specified column.


Identifying the Correct Function Based on the analysis above, the function that calculates the average of a numeric column is AVG().

Final Answer Therefore, the correct answer is AVG().


Examples
In a classroom setting, the AVG() function can be used to calculate the average score of students on a test. For example, if a table named 'Scores' has a column named 'TestScore' containing the scores of all students, the query SELECT AVG(TestScore) FROM Scores; would return the average test score for the class. This helps the teacher understand the overall performance of the class on the test.

Answered by GinnyAnswer | 2025-07-05