title: Translating a table into a Pivot Table
body: <p>I'd like to know if it is possible to translate the table below:</p>
  
  <p><img src="https://i.stack.imgur.com/f8b0C.png" alt="enter image description here"></p>
  
  <p>into a pivot table like this?</p>
  
  <p><img src="https://i.stack.imgur.com/MKDKF.png" alt="enter image description here"></p>
  
  <p>i tried the query below but it is not giving me the right results:</p>
  
  <pre><code>SELECT * FROM
  (
      select 
          WorkWeek
          , CometsFT
          , CometsTR
          , CSP
          , MaxCIMFT
          , MaxCIMTR
          , MaxCIMWS
          , STD
      from tblLotTrackingDetails
  ) s
  pivot
  (
      sum(cometsft)
      for WorkWeek in (WW6, WW7, WW8, WW9, WW10)
  )as piv
  </code></pre>