Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert data into columns

Andrew RDec 26 2022

Hi All,
How to convert the below data into the desired output:
DAY NET_SALES COST_OF_SALES GROSS_PROFIT
12 500 400 100
11 600 500 100
19 1791 1500 291
16 6300 5350 950

desired output:
DAY 12 11 19 16
NET_SALES 500 600 1791 6300
COST_OF_SALES 400 500 1500 5350
GROSS_PROFIT 100 100 291 950

Comments
Post Details
Added on Dec 26 2022
9 comments
327 views