title: limiting the rows to where the sum a column equals a certain value in MySQL
body: <p>I want to write a query which returns all rows until the sum of one of the columns value reaches a certain value. </p>
  
  <p>For example in the table below:</p>
  
  <pre><code>           DATE             ETC      Meeting
      2013-02-01 00:00:00    85482        1
      2013-02-01 00:00:00    47228        2
      2013-02-02 00:00:00    12026        4
      2013-02-03 00:00:00    78927        6
      2013-02-04 00:00:00    85662        2
      2013-03-05 00:00:00    47978        1
      2013-08-07 00:00:00     8582        1
  </code></pre>
  
  <p>If I want to get the rows until the sum of column <code>Meeting</code> equals 7.</p>
  
  <pre><code>           DATE             ETC      Meeting
      2013-02-01 00:00:00    85482        1
      2013-02-01 00:00:00    47228        2
      2013-02-02 00:00:00    12026        4
  </code></pre>
  
  <p>If I want to get the rows until the sum of column <code>Meeting</code> equals 13.</p>
  
  <pre><code>     DATE                   ETC      Meeting
      2013-02-01 00:00:00    85482        1
      2013-02-01 00:00:00    47228        2
      2013-02-02 00:00:00    12026        4
      2013-02-03 00:00:00    78927        6
  </code></pre>