The following table lists the Behavior of Group Functions and Null Values
Set X | SUM(X) | MIN(X) | AVG(X) | MAX(X) |
---|---|---|---|---|
{1,2,3,NULL} | 6 | 1 | 2 | 3 |
{1,2,3,0} | 6 | 0 | 1.5 | 3 |
{1,2,3,2} | 8 | 1 | 2 | 3 |
The SUM function does not make any distinction between {1,2,3,NULL} and {1,2,3,0}.
The MIN and AVG functions don't make any distinction between {1,2,3,NULL} and {1,2,3,2}.
The MAX function gives the same result on all three sets.