I will have a list of records like this
and I need to drop the duplicate record but the one which comes first rather than later and the output should be
My approach is to see if there is any way to compare the substring (the first 4 characters) of the string(in this case considering the entire record as string eg: 1111,abdc,D23). But I am not able to visualize how can I ignore the first record and return only second duplicate record. A sample code would also be appreciated.