title: Create/Append table with sum of values grouped in different categories
body: <p>I have an expense table like:</p>
  
  <pre><code>WorkWeek  Catg  Item    Cost
  WorkWeek1 Cat1  Item1   Price
  WorkWeek1 Cat1  Item2   Price
  WorkWeek1 Cat1  Item3   Price
  WorkWeek1 Cat1  Item4   Price
  WorkWeek1 Cat2  Item1   Price
  WorkWeek1 Cat2  Item5   Price
  WorkWeek1 Cat2  Item6   Price
  WorkWeek1 Cat3  Item1   Price
  WorkWeek1 Cat3  Item5   Price
  .
  .
  WorkWeekA CatB  ItemC   Price
  </code></pre>
  
  <p>This is how I am doing it right now:</p>
  
  <pre><code>select top(1)
       (select sum(cost) from DataTable where Catg like 'Cat1') as Cat1TotalCost
      ,(select sum(cost) from DataTable where Catg like 'Cat2') as Cat2TotalCost
      ,(select sum(cost) from DataTable where Catg like 'Cat3') as Cat3TotalCost
      .
      .
      .
      .
  from DataTable where WorkWeek like 'WorkWeek1'
  </code></pre>
  
  <p>And If I don't use the <code>top 1</code> then I get the same sums repeated over like thousands of rows. Also, my way of doing it only accounts for 1 workweek. :(</p>
  
  <p>I want to create a Table with each workweeks total expense depending in each category something like :</p>
  
  <pre><code>WorkWeek1   Cat1TotalCost   Cat2TotalCost   Cat3TotalCost
  WorkWeek2   Cat1TotalCost   Cat2TotalCost   Cat3TotalCost
  .
  .
  </code></pre>