I have these set of data in oracle :
app_name batch_group session_total
-------- ------------ -------------
app1 b1 5
app2 b1 10
app1 b2 80
app2 b2 99
app1 b3 20
app2 b3 59
I want to come out data with these format in oracle
app_name session1 session2 session3
-------- -------- -------- --------
app1 5 80 20
app2 10 99 59
session will increase base on how many batch. if got 6 batch in will come out until session6. please help me because im new in sql