title: How to get rows having sum equal to given value
body: <p>There is table contain</p>
  
  <pre><code>ID     Qty
  ----------
  1       2
  2       4
  3       1
  4       5
  </code></pre>
  
  <p>Now if i had to choose rows where sum of Qty equals to 10,
  How can i do this ?</p>
  
  <p>like 2+4+1 = 7
  but if i add 5 then 12</p>
  
  <p>so ignore 2, then
  4+1+5 = 10</p>
  
  <p>How can i achieve this ?</p>
  
  <p>Edit:</p>
  
  <p>I want any possible combination which sums up to gives value.
  suppose 7 then any rows which sums up to 7
  like wise if 8 then any rows sums up to 8</p>
  
  <p>want row/rows having combination equals to given value.</p>