title: SELECT from tbl 'value1' minus the 'previous value'
body: <pre><code>SELECT      totalAmount
  FROM        tbl
  BETWEEN     'date1' AND 'date2'
  
  GROUP BY    DATE(date created) 
  ORDER BY    DATE(date created)
  </code></pre>
  
  <p>That gives me the total amount per day that is in the table. But what I want is the incremental value compared to the previous entry (not necessarily the previous day)</p>
  
  <p>The table might be something like:</p>
  
  <pre><code>totalAmount    |    date created
  ---------------------------------
  1000           |    1st Jan
  1001           |    2nd Jan
  1003           |    3rd Jan
  1008           |    15th Jan
  </code></pre>
  
  <p>So where my query would return:
  1000,1001,1003,1008. </p>
  
  <p>What I actually want is:
  (a number compared to previous entry - but not within the BETWEEN date range in order to start my incriments),1,2,5</p>