title: Calculating running average with sqlite
body: <p>I am using the following code to calculate a running average:</p>
  
  <pre><code>SELECT AVG(close) FROM daily
  ORDER BY datum DESC
  LIMIT 50
  </code></pre>
  
  <p>for a 50-day average. However, it doesn't seem to work. I can change <code>LIMIT</code> to <code>5</code>, <code>10</code>, <code>20</code>. The result is always the same. Is the <code>LIMIT</code> just a visual limit maybe?</p>