Database Management
primer-original-v2mediumSQLAggregate FunctionsNULLprimer-original-v2

How do aggregate functions like COUNT(), SUM(), and AVG() handle NULL values?

Answer options

A
They treat NULL as zero
B
They skip NULL values (except COUNT(*))
C
They return NULL if any value is NULL
D
They throw an error

Correct answer: They skip NULL values (except COUNT(*))

Detailed Solution & Conceptual Analysis

This question has been retained as-is due to its unique context.

Key Engineering Takeaway

In Database Management, understanding the underlying mechanics of SQL is critical for writing performant, bug-free production code and passing rigorous technical architecture reviews.

Related Database Management questions

Practice more Database Management questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.