title: Need help to transpose rows to columns
body: <p>I'm sorry to flat out ask for someone to write my code for me but I've been tearing my hair out for nearly an hour trying to get the pivot operator to work in SQL. </p>
  
  <p>I have the following results set:</p>
  
  <pre><code>SCCY AccountedPremiumCurrent AccountedPremiumPrevious
  ---- ----------------------- ------------------------
  CAD  99111.0000              NULL
  EUR  467874.0000             128504.0000
  GBP  431618.3847             195065.8751
  USD  1072301.1193            1171412.1193
  </code></pre>
  
  <p>And I need to pivot it around to this:</p>
  
  <pre><code>GBP         USD          CAD        EUR
  ----------- ------------ ---------- -----------
  431618.3847 1072301.1193 99111.0000 467874.0000
  195065.8751 1171412.1193 NULL       128504.0000
  </code></pre>
  
  <p>I have a workaround which uses a union across two ugly "<code>select max(case when...</code>" queries but I'd love to get this working with the pivot operator. </p>
  
  <p>I feel like my brain cannot process the necessary logic to perform this operation, hence I'm asking for someone to help. Once I get this I'll be able to hopefully re-apply this like a pro...</p>