Total Average Function made by sql AVG()