title: MySQL: select and SUM previous values in specific column
body: <p>Is there a way to select values from table and sum all previous values?</p>
  
  <p>table sample:</p>
  
  <pre><code>+-------------+
  | id | Amount |
  +-------------+
  |  1 |   10   |
  |  2 |   10   |
  |  3 |   10   |
  |  4 |   10   |
  |  5 |   10   |
  |  6 |   10   |
  |  7 |   10   |
  +----+--------+
  </code></pre>
  
  <p>Is there a way to select data from the table and sum "Amount" values (sum all previous ):</p>
  
  <pre><code>+-------------+
  | id | Amount |
  +-------------+
  |  1 |   10   |
  |  2 |   20   |
  |  3 |   30   |
  |  4 |   40   |
  |  5 |   50   |
  |  6 |   60   |
  |  7 |   70   |
  +----+--------+
  </code></pre>
  
  <p>thx,</p>