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

Home -> Community -> Usenet -> c.d.o.server -> Aggregate query

Aggregate query

From: Alexander T .Agung <alexander.agung_at_lippobank.co.id>
Date: Wed, 9 Feb 2000 13:48:40 +0700
Message-ID: <Dwko4.4363$15.35150@news>


Hello all,

I want to do a query to calculate aggregate using SUM function

SELECT cdhsum.start_time, evsum.event, sum(evsum.sum_tot) FROM cdhsum, evsum
WHERE cdsum.sumid = evsum.sumid AND

                (TO_CHAR(start_time, 'DD/MM/YY') BETWEEN '&date1' dan

'&date2')

GROUP BY start_time, event;

result : 208 rows.

but the query result was the same as i do the query without GROUP BY.

SELECT cdhsum.start_time, evsum.event, evsum.sum_tot FROM cdhsum, evsum
WHERE cdsum.sumid = evsum.sumid AND

                (TO_CHAR(start_time, 'DD/MM/YY') BETWEEN '&date1' dan

'&date2');

result : 208 rows

What is wrong with the query ?????

Thanks

Alexander T. Agung Received on Wed Feb 09 2000 - 00:48:40 CST

Original text of this message

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