Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Computing difference of column sums

Computing difference of column sums

From: Sham <shameemg_at_club-internet.fr>
Date: Sun, 6 Jun 1999 00:43:29 +0200
Message-ID: <7jc96v$rqr$1@front1.grolier.fr>


Hi, I'm looking for a means to solve the following problem in sqlplus : I have the following columns :

Account       Debit       Credit
=====        ====       ====
a/c1             10               20
a/c1             15              25
Sum             25               45        <- Line calculated in a break ...
compute statement

Now, I want to calculate the difference between the sum of debit and the sum of credit and display it underneath. The finality of that is to find an account where sum(debit) is different from sum(credit)

How can I do that ? Thanks for helping me. Please also reply to shameemg_at_club-internet.fr Received on Sat Jun 05 1999 - 17:43:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US