Seems nobody does any research anymore, this question has been answered hundreds (thousands?) of times on every forum.

go to asktom.oracle.com
and search for 'pivot table'