I've setup a section for reviews with several fields as numbers for a rating 0-5, I'm trying to figure out how to get the total of all reviews and sum of all reviews to provide a single average for an entry the reviews relate to.
What's the best approach to this.
Example of my fields:
Value Condition Reception etc
all graded 0-5 (number fields).
So how to go through the foreach and get the sum of all fields from all reviews then divide by total reviews for the related entry to get the average for each field.