title: SQL Server - Group By
body: <p>Input Data</p>
  
  <pre><code>ID    Value1    Value2    Value3    Value4
  100    10        ABC       15:00     4551
  100    20        DEF       18:00     4556
  103    30        XYZ       13:00     5667
  103    40        TTT       11:00     4789
  </code></pre>
  
  <p>Desired Result</p>
  
  <pre><code>ID    Result1    Result2   Result3   Result4
  100    10        ABC       15:00     4551, 4556
  103    40        TTT       11:00     5667, 4789
  </code></pre>
  
  <p>I want to group input data by ID. Result 1, Result 2 and Result 3 columns should be values from row with minimum Value3. And Result 4 should be concatenation of Value 4.</p>
  
  <p>Can I do this without cursors and loops. </p>