MySQL has many built-in mathematical and aggregate functions that you can use in SQL statements for performing calculations on values in databases. Functions in this chapter include those used for statistical information, such as counting rows and determining the average of a given column’s value.
be aware of a few factors regarding some of these functions: all
mathematical functions return NULL when there is an error. If an
aggregate function is used without a
clause, it operates on all rows. The following aggregate functions
GROUP BY clause: