Sami Jenedi Sami Jenedi - 3 months ago 28
SQL Question

Would null value change the average?

What will be the result of this query? (Oracle SQL)


If the values of TEST_SCORE are (96, 84, null)

isn't 90.00? Because null wouldn't change the answer?

Thank you

Answer Source

A NULL value will not change the average. The average of the two numbers is 90. In general, aggregation functions ignore NULL values -- including min(), max(), avg(), count() (except count(*)), and sum().

Here is a little rextester showing what happens.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download