title: Moving averages with MongoDB's aggregation framework?
body: <p>If you have 50 years of temperature weather data (daily) (for example) how would you calculate moving averages, using 3-month intervals, for that time period? Can you do that with one query or would you have to have multiple queries? </p>
  
  <pre><code>Example Data
  
  01/01/2014 = 40 degrees
  12/31/2013 = 38 degrees
  12/30/2013 = 29 degrees
  12/29/2013 = 31 degrees
  12/28/2013 = 34 degrees
  12/27/2013 = 36 degrees
  12/26/2013 = 38 degrees
  .....
  </code></pre>