Use Average method to calculate the average value from a query