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 -> Re: Group by question...

Re: Group by question...

From: Alexander I. Doroshko <aid_at_grant.kharkov.ua>
Date: 19 Jun 1999 13:32:06 GMT
Message-ID: <01beba57$b557bde0$190114c1@sister.grant.UUCP>


select
  max(decode(t1.MonthYear, t2.MonthYear, t1.Amount, 0)) Amount,   t2.MonthYear,
  sum(t1.Amount) Amount
 from Your_Table t1, Your_Table t2
 where
  t1.MonthYear<=t2.MonthYear
 group by
  t2.MonthYear
 order by
  t2.MonthYear
;
--
 Alexander I.Doroshko, aid_at_grant.kharkov.ua

Received on Sat Jun 19 1999 - 08:32:06 CDT

Original text of this message

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