SQL - Select 3 most recent records to sysdate

Yeah it's an Oracle database I'm querying from.

Rownum will only retrieve 3 records, I need to retrieve the 3 most recent dates from today per unique ID (which I have about 900).

Sorry I should have explained it better in my OP.
 
Thanks for your efforts chaps, however I still can't get this to work.

Using the example above, each 'sequence#' will need to return 3 'first_time' records. There are more than 3 'first_time' records per 'sequence#', so I'm returning the first three closest to today.

Does that make sense??
 
Back
Top Bottom