88.7k views
4 votes
The AVG function only includes non-NULL values in its calculations.

A) TRUE
B) FALSE

1 Answer

3 votes

Final answer:

The AVG function indeed excludes NULL values when calculating the average value of a given column. This behavior ensures that the absence of data does not affect the computed average. The statement is true.

Step-by-step explanation:

The statement that the AVG function only includes non-NULL values in its calculations is TRUE. In database management systems, such as SQL, the AVG function is used to calculate the average value of a given numeric column. When computing the average, it automatically excludes NULL values since NULL indicates the absence of data and cannot be factored into the calculation of the average.

For example, if we have a set of values (10, 20, NULL, 30), the AVG function will only consider the values 10, 20, and 30 for its calculation. The resulting average would be the sum of 10, 20, and 30, which is 60, divided by the count of non-NULL values, which is 3, leading to an average of 20.

User Grimtron
by
7.7k points