Avoid using Teradataspecific functions such as MAVG, CSUM, and MSUM for applications intended to be ANSIcompliant and portable.
ANSI Function  Teradata Function  Relationship 

AVG  MAVG  The form of the AVG window function that specifies an aggregation group of ROWS value PRECEDING is the ANSI equivalent of the MAVG Teradataspecific function. Note that the ROWS value PRECEDING phrase specifies the number of rows preceding the current row that are used, together with the current row, to compute the moving average. The total number of rows in the aggregation group is value + 1. For the MAVG function, the total number of rows in the aggregation group is the value of width. For AVG window function, an aggregation group of ROWS 5 PRECEDING, for example, means that the 5 rows preceding the current row, plus the current row, are used to compute the moving average. Thus the moving average for the 6th row of a partition would have considered row 6, plus rows 5, 4, 3, 2, and 1 (that is, 6 rows in all). For the MAVG function, a width of 5 means that the current row, plus 4 preceding rows, are used to compute the moving average. The moving average for the 6th row would have considered row 6, plus rows 4, 5, 3, and 2 (that is, 5 rows in all). 
SUM  CSUM MSUM 
Be sure to use the ANSIcompliant SUM window function for any new applications you develop. Avoid using CSUM and MSUM for applications intended to be ANSIcompliant and portable. The following defines the relationship between the SUM window function and the CSUM and MSUM Teradataspecific functions, respectively:
