title: PIVOT multiple rows into columns
body: <p>I have table like below. Consider the query </p>
  
  <pre><code>select invoice_mth, inv_amt from table xdetails
   where mobile_number=9080808080
  </code></pre>
  
  <p>data in the table </p>
  
  <pre><code>mobile_number   invoice_mth  inv_amt
   9080808080     2010-10        20
   9080808080     2010-11        30
   9080808080     2010-12        40
  </code></pre>
  
  <p>I have to display the data from table like below.</p>
  
  <p>I want invoice months to separate each month and amt separately.</p>
  
  <pre><code>MOBILE_NUMBER   inv_m1   inv_m2    inv_m3   amt1    amt2    amt3
  ------- ----------------------------------------------------------
   9080808080    2010-10   2010-11   2010-12   20       30      40
  </code></pre>
  
  <p>to display the data like above what I have to do?</p>