
Need a help to build the expected result shown in screen shot and also in attached file.
As we see in the Row number 3. We have ITEMCODE= 8PA2543YDNEWMOD2 and for Like Profile=8PA2543YDNEWMOD1 which has a like profile= 310006 in row number 2. so we need the expected result for 8PA2543YDNEWMOD2 as shown in Expected result.
As we see in the Row number 4. We have ITEMCODE= 8PA2543YDNEWMOD3 and for Like Profile=8PA2543YDNEWMOD2 which has a like profile= 8PA2543YDNEWMOD1 in row number 3 and which also has a like profile in row number 2 as 310006. so we need the expected result for 8PA2543YDNEWMOD3 as shown in result.