In some cases, the information we need is not actually stored in the database but we can retrieve it by computing in some ways from stored data. For example, we have OrderDetails table to store order data, we don't know total of money of all selling products when we look at the table. In order to do so, we can use aggregate functions. By definition, aggregate functions allow us to perform a calculation on a set of records and return a single returned value. Aggregate functions ignore null value when performing calculation except COUNT function. Aggregate functions are often used with GROUP BY clause of SELECT statement. Here are aggregate functions which MySQL supports:
View Complete Post