📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

What does AVG(Salary) do with NULL salaries?

A. Raises an error
B. Returns NULL for the whole table
C. Counts them as zero
D. Ignores them in both sum and count ✅

Correct Answer: D. Ignores them in both sum and count

Explanation

  • AVG ignores NULL values entirely.
  • If NULLs were counted as zero the average would be wrongly lowered.