title: phpmyadmin manipulating data from another query result
body: <p>I have MySQL table looking like this :</p>
  
  <pre><code>bank_code | jan | feb | mar | apr | mei |
  -----------------------------------------
  bca       | 500 | 300 | 200 | 400 | 350 |
  bii       | 100 | 230 | 0   | 250 | 0   |
  bni       | 340 | 235 | 800 | 870 | 780 |
  </code></pre>
  
  <p>Is it possible to run a MySQL query to get output like this:</p>
  
  <pre><code>month | bca | bii | bni |
  -------------------------
  jan   | 500 | 100 | 340 |
  feb   | 300 | 230 | 235 |
  mar   | 200 | 0   | 800 |
  apr   | 400 | 250 | 870 |
  mei   | 350 | 0   | 780 |
  </code></pre>
  
  <p>The bank_code is dynamic data, count of bank_code is not always 3. </p>
  
  <p>I have tried many links that looks similar (<a href="http://buysql.com/mysql/14-how-to-automate-pivot-tables.html" rel="nofollow">http://buysql.com/mysql/14-how-to-automate-pivot-tables.html</a>), but I still failed. As I searching, this would be possible using dynamic pivot table by concat or group concat, but I'm newbie for this and I don't understand how to do it. Anyone can help ? Thanks before..</p>