calculating monthly average

one loop to get the total sale and total volume and another loop to
calculate the monthly average