Skip to main contentSkip to solution

Which of the following group function will NOT ignore NULL values?

Solution

✅ Correct Option: 4

MAX, SUM and COUNT(column_name) all skip NULL values and work only on the non-NULL values in the column. So no listed function takes NULL into account.

For example, if a column holds 10, NULL and 20, then SUM=30\text{SUM} = 30, MAX=20\text{MAX} = 20 and COUNT(column)=2\text{COUNT(column)} = 2.


Option 2: COUNT(*) counts every row, including rows with NULLs, and this is what makes COUNT look like the exception. COUNT(column_name), however, ignores NULLs.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question