Calculate the moving average

    For each row in a table, returns the average of the current value and previous values where n is the total number of values used to calculate the average.

    If :

    The following would return:

    timedMovingAverage()

    For each row in a table, timedMovingAverage() returns the average of the current value and all row values in the previous (duration). It returns moving averages at a frequency defined by the every parameter.

    Given the following input: