Home » SQL & PL/SQL » SQL & PL/SQL » earliest Date
earliest Date [message #7535] Thu, 19 June 2003 10:16 Go to next message
Barry Skinner
Messages: 2
Registered: June 2003
Junior Member
I have a table with the following data in it

NUMBER EFFECTIVE_DATE
001 1/15/1990 12:00AM
001 1/15/1993 12:00AM
001 1/15/1996 12:00AM
001 1/15/2001 12:00AM
002 4/1/1996 12:00AM
002 4/1/2001 12:00AM

I need to be able to select the record for each number with the earliest date.

My data has to look like
NUMBER EFFECTIVE_DATE
001 1/15/1993 12:00AM
002 4/1/1996 12:00AM

I've tried the Min function, the least function with several SQL statements.

nothing seems to be working correctly

can someone help
Re: earliest Date [message #7536 is a reply to message #7535] Thu, 19 June 2003 10:49 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Please do not crosspost. See:

Previous Topic: earliest date
Next Topic: Can count and distinct be used together
Goto Forum:
  


Current Time: Tue Apr 23 23:04:31 CDT 2024