sample.txt (9.43 KB)Hi Gurus,
I have a need to pull the history data from an employee table where the user status is terminated. The sample inserts are attached.
The output I need as below. The least record of an employee with status terminated, but if there are multiple recent terminations like 1134166 (3 terminated records), need to fetch the 3 record.
1134166 Aayushi Bhatnagar Terminated 22-JAN-21 15.07.15 22-JAN-21 15.08.07
1172439 Michael Tam Terminated 18-FEB-21 07.05.10 18-FEB-21 07.05.22
1215452 Mark Standrich Terminated 18-FEB-21 07.05.24 18-FEB-21 07.05.36
can you please help.