title: I am trying to group rows based on sum of Qty column not exceeding the value 10
body: <p>TSQL: Best way to group rows so that sum of the quantity won't exceed a value say 10 </p>
  
  <pre><code>ID  | Qty | Grp
  ---------------
  ID1 | 5   | 
  ID2 | 2   | 
  ID3 | 5   | 
  ID4 | 4   | 
  ID5 | 4   | 
  ID6 | 3   | 
  </code></pre>
  
  <p>Expected Result</p>
  
  <pre><code>ID  | Qty | Grp
  ---------------
  ID1 | 5   | 1
  ID2 | 2   | 2
  ID3 | 5   | 1
  ID4 | 4   | 2
  ID5 | 4   | 2
  ID6 | 3   | 3
  </code></pre>