Aggregative Functions and NULL Values
Statistic functions ignore NULL values.
NULL ignoring doesn't influence the results returning by MIN() and MAX() functions.
The rules of NULL values processing in statistic functions:
- if any values in the field are NULL they are ignoring while computing of the function results;
- if all values in the field are NULL, SUM(), AVG(), MIN(), MAX() functions return NULL value; COUNT() function returns zero;
- if the field is blank SUM(), AVG(), MIN(), MAX() functions return NULL value; COUNT() function returns zero;
- COUNT(*) function doesn't depend on presence or absence NULL values in the field; if there are no records in the table, this function returns zero.