This short MySQL script shows an aproach to compute the moving average.

MySQL - 7 Day Moving Average

      SELECT 
      FROM signups
      JOIN signups as sigups_past 
      ON signups_past.date between signup.date - 6 and signups.date
      GROUP BY 1, 2
⤧  Previous post Gradient Boosting Notes and Pictures ⤧  Next post Linear Algebra Fundamentals