title: Group & Aggregate multiple columns using LINQ
body: <p>I'm getting in a mess attempting to perform grouping and computing rows from a csv file using LINQ and C#.</p>
  
  <p>(sample csv)</p>
  
  <pre><code>T5,,929,,O,PPT-DAY,4,,,18.09,,ACXD:DSC,,,,,,,,,,,
  T5,,929,,O,PPT-DAY,4,,,18.09,,ACXD:DSC,,,,,,,,,,,
  T5,,644,,O,PPT-ANNUAL LEAVE,1,,,850.23,,INTERNAL,,,,,,,,,,,
  T5,,900,,O,PPT-ANNUAL LEAVE,1,,,42.51,,INTERNAL,,,,,,,,,,,
  T5,DEFAULT,674,,O,PPT-DAY,2,,,18.09,,ACXD:DSC,,,,,,,,,,,
  T5,,674,,O,PPT-PERSONAL LEAVE-ON,8,,,19.9,,INTERNAL,,,,,,,,,,,
  </code></pre>
  
  <p>SQL equivalent</p>
  
  <pre><code>SELECT Col3  
        ,Col5
        ,Col6
        ,SUM(Col7) as [hours]     
        ,AVG(Col10) as [pay]    
        ,Col12     
    FROM mytable
    GROUP BY Col3, Col5, Col6, Col12
    ORDER BY Col3, Col5, Col6, Col12
  </code></pre>
  
  <p>I've had a few shots at working this out using other threads but am struggling on the multi column grouping and computations. Any suggestions would be much appreciated.</p>