Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Help needed to find minimum in a series
Hi,
I have the following two tables:
Table 1
Userid Status 1234 A001 3456 C001 Table 2 Userid Status Start Date 1234 A001 01/01/2007 1234 A001 01/01/2006 1234 B001 01/01/2005 1234 A001 01/01/2004
Now what I want to get is the minimum date from table 2 for a userid
where his status in table 2 is the same his status in table 1 i.e. for
userid 1234 since his status is A001 in table 1 so I want the the date
on which his status A001 started in table 2 which means I want the
date '01/01/2006.
Can someone suggest how to frame this query.
Any help is welcome!!!
Thanks,
Sandy
Received on Tue Apr 17 2007 - 03:41:26 CDT