title: MySQL query to get first 10 in total `qty`
body: <p>So, my table is :</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">*uid</th>
  <th style="text-align: center;">code</th>
  <th style="text-align: right;">qty</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">CODE2200</td>
  <td style="text-align: right;">5</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">CODE2205</td>
  <td style="text-align: right;">6</td>
  </tr>
  <tr>
  <td style="text-align: left;">3</td>
  <td style="text-align: center;">CODE0002</td>
  <td style="text-align: right;">2</td>
  </tr>
  <tr>
  <td style="text-align: left;">...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: right;">...</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to fetch only first maximum of 10 from qty.</p>
  <p>The result i want is :</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">*uid</th>
  <th style="text-align: center;">code</th>
  <th style="text-align: right;">qty</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">CODE2200</td>
  <td style="text-align: right;">5</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">CODE2205</td>
  <td style="text-align: right;">6</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>What i know is, <code>limit</code> is for counting the first 'n' row, so it cant be used here.</p>
  <p>I'm trying to use <code>WHERE SUM(qty) &lt;= 10</code> also not work.</p>