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!

How to sum multiple columns with different grouping criteria

1035943Aug 27 2013 — edited Aug 27 2013

Currenly i am doing a project where i required to generate report which extracted from table. the table as per below

CURRENCY_A    AMOUNT_A    CURRENCY_B    AMOUNT_B    CURRENCY_C    AMOUNT_C

USD                      100                 EURO                  100              POUNDS             100

EURO                    200                 POUNDS             200              USD                    200

POUNDS               300                  USD                   300              EURO                  300

My expectations is the grand total sum of (AMOUNT_A+AMOUNT_B+AMOUNT_C) group by the currency

USD         :    

EURO     :

POUNDS    :

Is it possible to perform this output in oracle alone?

This post has been answered by Pacmann on Aug 27 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 24 2013
Added on Aug 27 2013
5 comments
11,290 views