Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help needed to find minimum in a series
Isn't the min date for 1234, A001 : 01/01/2004 ??
On Apr 17, 10:41 am, Sandy80 <svarshneym..._at_gmail.com> wrote:
> 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 - 08:00:38 CDT