Hi, I am working on data which have several values and I have to compare them. I am trying to use Lag function but unable to get through. Below are the context of data: MN TN EII ND 238552 40006248 1 1 316969 40006248 0 0 631788 40006248 1 0 660798 50098722 1 0 660007 50098722 0 0 661359 50098722 1 1 TN is the unique value and scenarios are: 1) we have to select TN with EII and ND as 1 and 1 only if TN with same number is followed by either EII and ND as 0 and 0 or EII and ND as 1 and 0. 2) No Duplicate entries for TN. Please suggest
... View more