title: How to get first record out of each group from the result retrieved by using group by command
body: <p>Suppose if my Input is:</p>
  
  <pre><code>ID  GroupID  Qty
  1         1  100
  2         1  200
  3         1  300
  4         2  98
  5         2  198
  6         3  175
  7         3  275
  8         3  375
  9         4  215
  </code></pre>
  
  <p>Output should be </p>
  
  <pre><code>ID   GroupID    Qty
   1         1    100
   4         2    98
   6         3    175
   9         4    215
  </code></pre>
  
  <p>Can any one help me how to do it with SQL Server <code>T-SQL</code> query?</p>