title: calculate the differences between two rows in SQL
body: <p>I have a SQL table, one row is the revenue in the specific day, and I want to add a new column in the table, the value is the incremental (could be positive or negative) revenue between a specific day and the previous day, and wondering how to implement by SQL?</p>
  
  <p>Here is an example,</p>
  
  <p>original table,</p>
  
  <pre><code>...
  Day1 100
  Day2 200
  Day3 150
  ...
  </code></pre>
  
  <p>new table (add incremental column at the end, and for first column, could assign zero),</p>
  
  <pre><code>Day1 100 0
  Day2 200 100
  Day3 150 -50
  </code></pre>
  
  <p>I am using MySQL/MySQL Workbench.</p>
  
  <p>thanks in advance,
  Lin</p>