No that will give me 9/18/2004. I want to return 8/18/2006, which is
the second time they get promoted.
-----Original Message-----
From: Lupe Garcia
[mailto:oracledba-ezmlmshield-x15883219.[Email address protected]
Sent: Wednesday, May 16, 2007 4:38 PM
To: LazyDBA Discussion
Subject: Re: sql help
Try this:
SELECT MIN (DATE)
FROM table_name
WHERE job = 440 AND empid = 355;
Jeff Chirco wrote:
> Here is my dilemma. I have the table like below
>
>
>
> EMPID DATE JOB
>
> 355 8/9/2003 450
>
> 355 9/18/2004 440
>
> 355 2/7/2005 450
>
> 355 8/18/2006 440
>
> 355 11/25/2006 440
>
>
>
> What I need to get is somebody's last promotion date. So if I want to
> see when this person was last promoted to job 440 I want to see
> 8/18/2006, not 11/25/2006 or 9/19/2004. Or if I want to see when this
> person was last promoted to job 450 I would expect to see 2/7/2005. I
> can't figure out how to query this data.
>
> Thanks for any help.
>
>
>
>
>
> Jeff
>
>
>
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
> To post a dba job: http://jobs.lazydba.com
> To Subscribe : http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
>
>
>
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
Oracle LazyDBA home page