Consider the following
Sample Input
SalesBoyName Product Amount
------------ ------- ------
Boy1
You can do it like this in 10G:
select salesboyname,
sum (case when product='P1' then amount end) as p1,
sum (case when product='P2' then amount end) as p2,
sum (case when product='P3' then amount end) as p3
from tblsales
group by salesboyname;
In 11G there is a PIVOT keyword similar to SQL Server's.