CS FundamentalsModerateWipro Elite · LTIMindtree

T(x) holds 10, NULL, 20, 30, NULL. What does SELECT AVG(x) FROM T return?

  1. A. 12
  2. B. NULL
  3. C. 20
  4. D. 24

Correct answer: C. 20

AVG ignores NULLs: (10 + 20 + 30) / 3 = 20, not 60 / 5 = 12.

More DBMS and SQL questions

Exams that ask this topic