Null (SQL): Difference between revisions

Content deleted Content added
m Aggregate functions: English and puctuation
Line 583:
|}
 
Here <code>AVG(i)</code> is 200 (the average of 150, 200, and 250), while <code>AVG(j)</code> is 150 (the average of 150, 200, 250, and 0). A well-known side effect of this is that in SQL, <code>AVG(z)</code> is not equivalent with not <code>SUM(z)/COUNT(*)</code> but with <code>SUM(z)/COUNT(z)</code>.<ref name="Chamberlin1998"/>
 
The output of an aggregate function can also be Null. Here is an example: