You could always search the forum. The search feature is very good in the upgraded forum.
In addition to Karthick (search is indeed much better!) and Blu (let's hope OP bookmarks the FAQ-link ):
Tim Hall's Oracle-Base is loaded with articles and examples regarding them:
you can find lots more examples if you search on http://asktom.oracle.com
Keep in mind that aggregating columns <> pivoting
And some more profound explanations: