title: Convert Row data to column in MySQL
body: <p>I have MySQL table which stores data in this format</p>
  
  <pre><code>Type|Month|Count
  ----+-----+-------
  1   |9    |4
  3   |9    |7
  99  |9    |2
  1   |10   |6
  3   |10   |7
  99  |10   |9
  .......
  </code></pre>
  
  <p>Type column can hold either of 3 values 1,3,99.
  Month will hold values from 1 to 12.
  Count can be anything random.</p>
  
  <p>The output I desire is something like this:</p>
  
  <pre><code>Month|Type1|Type3|Type99
  -----+-----+-----+-------
  9    |4    |7    |2
  10   |6    |7    |9
  ................
  </code></pre>
  
  <p>I came across <a href="http://www.sqlfiddle.com/#!2/0467e/14" rel="nofollow">this</a> Demo but couldn't understand much from it.</p>
  
  <p>Here's a sample <a href="http://www.sqlfiddle.com/#!2/8ba8c2/1" rel="nofollow">fiddle</a> with demo data.</p>
  
  <p>Any help is appreciated.</p>