sum function [message #20926] |
Tue, 02 July 2002 03:07 |
Raju
Messages: 74 Registered: March 1999
|
Member |
|
|
Hi,
With the following query Iam getting the result wrong
Pl. correct the query
Select
sum(aovalue),sum(netvalue),sum(taxedaovalue) gross,sum(taxedprvalue) gross1
From SaAo0 a,SaAo1 b
Where a.compcode=b.compcode
and a.compcode='02'
and a.branchcd=b.branchcd
and a.seriescd=b.seriescd
and a.aono=b.aono
And b.BranchCd = 'A1' And b.SeriesCd in ('AO','A2E')
and aostatus<>'C'
and aodt between to_date('01-JUN-2002','dd-mon-RRRR')
and to_date('30-JUN-2002','dd-mon-RRRR')
SUM(AOVALUE) SUM(NETVALUE) GROSS GROSS1
------------ ------------- --------- ---------
13290571 3820424.6 13515866 3885348.4
I want the Ist & IInd values same and IIIrd & IVth values same.
Regards,
Raju.
|
|
|
|