Functions ignore NULL

With the exception of COUNT(), all the other SQL aggregate functions ignore NULL values in a column. If the column only contains NULL, the function returns NULL.

  • COUNT(col): Returns the number of records. It also counts NULL values, which is something most of the other aggregate functions ignore.
  • AVG(col): Returns the average of the column
  • MIN(), MAX(): Returns min/max
  • SUM() : Sum of values