title: Rotate/pivot table with aggregation in Oracle
body: <p>I'd like to rotate a table in Oracle 11g. The pivot option requires an aggregation.
  This is my original table:</p>
  
  <pre><code>project | attribute | value
  ===========================
  'cust1' | 'foo'     | '4'
  'cust2' | 'bar'     | 'tbd'
  'cust3  | 'baz'     | '2012-06-07'
  'cust1' | 'bar'     | 'tdsa'
  'cust4' | 'foo'     | '22'
  'cust4' | 'baz'     | '2013-01-01'
  </code></pre>
  
  <p>After pivoting, the table should look like this:</p>
  
  <pre><code>project | foo | bar | baz
  =========================
  'cust1' | '4' |'tdba'| NULL
  'cust2' | NULL|'tbd' | NULL
  'cust3' | NULL| NULL | '2012-06-07'
  'cust4' | '22'| NULL | '2013-01-01'
  </code></pre>
  
  <p>Now, as you can see, the grouping should happen over the project column. No values need to be collapsed or calcucation. A mere rotation is necessary.
  So, is the pivot select the right thing to do?</p>