Hi Sir , Small correction is needed . ROWS BETWEEN 2 PRECEDING AND CURRENT ROW This specifies that the moving window includes the current row and the two previous rows (i.e., the last 3 orders, including the current one). But in the video moving_avg_for last 3 orders ROWS BETWEEN 3 PRECEDING AND CURRENT ROW is used