Sorry, new to oracle.
I’d like to get current and the last active record back:
ID int (PK)
RecordID int
Description varchar
TermDate datetime
Basically whenever the TermDate is null, it is active, but will get the last terminated record based off the RecordID. So RecordID is not unique, but will be unique when displayed in the results.
Assuming you want all current records, plus the last active record for each RecordID, try: