Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Complex PL-SQL Query ?
"Jusung Yang" <JusungYang_at_yahoo.com> wrote:
> > YDT 5 443322/B 01-JAN-99
> > YTD 5 443322/B 28-NOV-02
>
> Should the first be 'YTD'? If yes, you can do something like this:
>
> select * from <table> t1 where exists ( select * from
> (select HULLTYPE, max(ASOFDATE) d1 from <table> group by ASOFDATE)
t2
> where t1.HULLTYPE=t2.HULLTYPE and t1.ASOFDATE=t2.d1);
[group by ASOFDATE] or maybe [group by HULLTYPE]?
Regards,
Damjan S. Vujnovic
University of Belgrade
School of Electrical Engineering
Department of Computer Engineering & Informatics
Belgrade, Yugoslavia
http://galeb.etf.bg.ac.yu/~damjan/ Received on Thu Nov 21 2002 - 11:42:30 CST
![]() |
![]() |