When using MySQL, you can use the AVG()
function to calculate the average value from a range of values.
For example, you can use this function to find out what the average city population is for a given country or state. Given a country will have many cities, each with different populations, you can find out what the average is between them. One city might have a population of say, 50,000 while another has a population of 500,000. The AVG()
function will calculate the average for you.