This might be very simple, but I can't understand why the final result is 500.
What is the mathematical operation done to get to that result?
CodePudding user response:
In your table there are two rows with pro_com = 16. Their values are 450 and 550, the average of which is 500.
CodePudding user response:
AVG () computes the average of a set of values by dividing the sum of those values by the count of nonnull values. If the sum exceeds the maximum value for the data type of the return value, AVG() will return an error.