Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Problem with SQL Sum across multiple tables
Here is the problem I encountered. Your help is appreciated
I have a 3 tables:
NaturalAccount Glfact Fact --------------- ------ ---- naturalaccountid Glfactid Glfactid Naturalaccountid AAmount
For each naturalaccountid, there could be multiple glfactid in Glfact table. I want to create a query statement where for each naturalaccountid, I get the sum of all its aamount. The resulting query should look like this
NaturalAccountID1 20.00 NaturalAccountID2 40.00 NaturalAccountID3 99.00
where 20.00, 40.00, 99.00 are each the summation of all the GLfactid under that particular naturalaccountid
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Tue Aug 04 1998 - 16:41:16 CDT
![]() |
![]() |