title: Changing orientation of a table in sql
body: <p>I have a table which looks as follows:</p>
  
  <pre><code>count  occupation  gender
  800    engineer     M
  400    engineer     F
  700    doctor       M
  100    doctor       F
  </code></pre>
  
  <p>I want the table to look as </p>
  
  <pre><code> Gender  engineer doctor
     M     800      700
     F     400      100
  </code></pre>
  
  <p>How can I bring about this change?</p>