Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Impossible SQL query?
Have you looked into something along the lines of (sorry, Tom Kyte I am
not)
select a.*, b.*
from ( select date, row_num() over (partition by key order by id ) rn
from table where key = 'B' ) a,
( select date, row_num() over (partition by key order by id ) rn from
table where key = 'E' ) b
where a.rn = b.rn
-- and a.if is not null
Received on Tue Oct 04 2005 - 10:52:31 CDT