average column mysql

How to Get the Average of One Column in MySQL Database using PHP

This tutorial tackles on how to get the average of one column in mysql database using PHP. There are instance that we wanted to get the average of one column for reporting purposes like average sales, expenses etc. Normally, we get the sum of the column then we divide it by number of rows but actually there is a sql function that determines the average of one column.