Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > Query using gro...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 6852 of 6990
Post > Topic >>

Query using group

by Prasath <prasath.rao@[EMAIL PROTECTED] > Apr 23, 2008 at 05:35 AM

i have a table with 4 columns,  they look like

currency1 currency2 amt1 amt2
=======================
USD   GBP   10    9
GBP   USD    5    8
JPY    INR    20    7
INR      JPY 14    100

i want to cross add the amounts for each group of currency1 and
currency2.  now, the currency groups are bit unusal.    For example,
the first two rows in the above table fall under the group USD+GBP (or
GBP+USD, the other does not matter)

the result should look like

currency1 currency2 sum1 sum2
USD GBP 18 14 (from 10+8 and 9+5)
INR JPY 120 21 (from 20+100 and 14+7)

any ideas?
 




 3 Posts in Topic:
Query using group
Prasath <prasath.rao@[  2008-04-23 05:35:58 
Re: Query using group
Ed Prochak <edprochak@  2008-04-23 05:50:31 
Re: Query using group
Prasath <prasath.rao@[  2008-04-23 05:57:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 16:47:05 CDT 2008.