title: Mysql cumulative sum and group by month year
body: <p>How can I make a cumulative sum of mysql column and group by month year
  here is my table "saving"</p>
  
  <pre><code>id date         value
  1  01/01/2018   10
  2  01/12/2018   5
  3  02/03/2018   6
  4  02/23/2018   4
  </code></pre>
  
  <p>I try this query</p>
  
  <pre><code>SET @SumVariable:=0;
  select CONCAT(LEFT(monthname(date),3),'-', year(date)) as month
      ,sum(value)
      ,(@SumVariable := @SumVariable + sum(value)) AS total
  FROM saving
  GROUP BY year(date), month(date) LIMIT 50
  </code></pre>
  
  <p>The query returns </p>
  
  <pre><code>month      value
  jan-2018    15
  feb-2018    10
  </code></pre>
  
  
  
  <p>It's not cumulative the sum, I need the output to be as follow</p>
  
  <pre><code>month       total
  jan-2018    15
  feb-2018    25
  </code></pre>