Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL Help Urgent!!!!!!!!!
Select a.id,a.amount,ccinlineview.bamt from bb a,(Select id,sum(b.amount)
bamt from cc b group by id) ccinlineview where a.id = ccinlineview.id
ID AMOUNT BAMT
1 1000 1000
1 row selected.
-----Original Message-----
Sent: Monday, May 13, 2002 10:53 AM
To: Multiple recipients of list ORACLE-L
Hi gurus
I have two tables like this
SQL> select * from bb;
ID AMOUNT DT
---------- ---------- ------------------------------ 1 1000 10-MAY-02
SQL> select * from cc;
ID AMOUNT
---------- ------------------- 1 200 1 300 1 500
My query like this
ID SUM(A.AMOUNT) SUM(B.AMOUNT)
---------- ------------- ----------------------------------------
1 3000 1000
But my output should be like this
ID SUM(A.AMOUNT) SUM(B.AMOUNT)
---------- ------------- ----------------------------------------
1 1000 1000
Anybody can help me in this issue please.
Regards.
syed
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Vikas Khanna INET: vkhanna_at_quark.co.in Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon May 13 2002 - 00:58:20 CDT
![]() |
![]() |