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!

Regarding summary Query...!

500894Jul 28 2006 — edited Jul 28 2006
Hi,

i need a solution to this query.....

i have a table which looks like this

bot_ccy sold_ccy bot_amount sold_amount
--------------------------------------------------------------------------------
USD AED 120000 150000
AED INR 5000 6000
INR GBP 80000 70000
GBP USD 7000 2000
USD GBP 220000 2000

Now i need a summary for each currency like this:

i need to show bot_ccy and sold_ccy in a single column
and then sum up all bot_amounts for each currency
and sum up all sold_amounts for each currency and then net it.
i am facing problem in writing this query...

suggestions required.....


currency bot_amount sold_amount net_amount
-------------------------------------------------------------------------- ------------
USD 340000 150000 190000
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2006
Added on Jul 28 2006
5 comments
256 views