I have a table that I need to select the newest entry base upon a date field for each person listed. The requirement is that I need to select the two rows for the encounterID with the newest date (measrment_dt) for a given person (sys_id column). I have a sample extract from the table attached. The top table is the simple select * from table output. I have highlighted the rows that I would need to select in my query. The table below is the output I am seeking. Thanks in advance for your help.