title: How to change row value into column header
body: <pre><code>select
  extract(year from datetimestamp ) Yr,extract(month from datetimestamp) Mn,
  c.weekday_of_month wk, a.aircraft_type,count( a.aircraft_type)  from fcm_bv.Flights b
  join fcm_bv.Fleet a on  b.aircraftid=a.tail 
   join SYS_CALENDAR.CALENDAR c
   on cast(b.datetimestamp AS DATE FORMAT 'YYYY-MM-DD') = cast(c.calendar_date AS DATE FORMAT 'YYYY-MM-DD')
  where cast(datetimestamp as date) &gt;= '2011-09-01'
  and cast(datetimestamp as date) &lt;= '2011-09-30'  order by wk
  group by Yr,Mn,wk,a.fleet,a.aircraft_type
  </code></pre>
  
  <p>While Running above Query I am getting out put like this </p>
  
  <pre><code>Yr      Mn  wk  AIRCRAFT_TYPE   Count(AIRCRAFT_TYPE)
  2011    9   1   B737-700        1744
  2011    9   1   B737-800        131
  2011    9   1   B737-800W       2711
  2011    9   1   B737-8BK        180
  2011    9   1   B737-700W       329
  </code></pre>
  
  <p>But I need output in below format </p>
  
  <pre><code>Yr   Mn    wk    B737-700    B737-800  B737-800W   B737-8BK    B737-700W      
  2011 9      1      1744       131          2711        180         329
  </code></pre>
  
  <p>Could any one help me </p>