There is presently no easy way to average the values of a given column - at the database level - by leveraging query sets. In order to palliate this, let's add a new #average method to the base query set implementation. This new method should take the name of a field for which the average should be computed.
Description
There is presently no easy way to average the values of a given column - at the database level - by leveraging query sets. In order to palliate this, let's add a new
#average
method to the base query set implementation. This new method should take the name of a field for which the average should be computed.For example: