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 -> Re: rownum & group by question

Re: rownum & group by question

From: Bertrand Guillaumin <guillauminb_at_hotmail.com>
Date: 22 Mar 2006 09:46:13 -0800
Message-ID: <1143049573.252288.95090@z34g2000cwc.googlegroups.com>


Here is an example for test2 (YEAR INTEGER,AMOUNT INTEGER).

SELECT MAX(DECODE(YEAR,2005,SUM,NULL)),MAX(DECODE(YEAR,2004,SUM,NULL)) FROM
(SELECT YEAR,SUM(AMOUNT) as SUM FROM TEST2 GROUP BY YEAR ) Received on Wed Mar 22 2006 - 11:46:13 CST

Original text of this message

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