Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: rownum & group by question
select rownum,
a.*
from
( select clt_id, tx_ye_dt, sum(jrsd_nia_amt) amt from comp.mj_inc_al group by rownum,clt_id, tx_ye_dt, jrsd_cd having clt_id = 15 and jrsd_cd = 9155 order by tx_ye_dt desc ) a where rownum < 3
returns :
1 15 31/12/2004 4636 2 15 31/12/2003 5437 3 15 31/12/2002 14264
I can't do it ! Help !
I want to pivot, returning one row with first 2 years of data ...
1 15 31/12/2004 4636 5437 Received on Wed Mar 22 2006 - 10:26:08 CST