An overflow occurs when you try to put a vlue into a space in memory that is
not large enought to hold that value.
I would start by using a test query to create a column each component of
that calculation so you can determine which component is causing the
overflow. Then use decide what to do. If it's the Sum operation, You might
try using CDbl to cast the no or transactions to Double before summing them.
It is unlikely that you can exceed the max value of a Double type, but if
you do, you can try dividing them by 1000, for example, before summing them,
doing the same to the average so you have apples and apples.