compare cell 2 with cell 1 and show result
Dear All,
I need your help.
I have below sample data and want to compare Cell F (column Snap_Id) with previous row value.
e.g. row_num 2 should compare with row_num 1 and if it is matching it should say “No” and if it is not matching like row_num 3 compare with row_num 2 then it should say “Yes”.
Can you please help me to write SQL statement to achieve it. I tried self join but then it is returning me 12 records with incorrect data.
The final output I am expecting is as below,
Hope you can help me with this.
Thanks in advance.
Regards,
Abhishek
Dear All, I need your help.I have below sample data and want to compare Cell F (column Snap_Id) with previous row value.e.g. row_num 2 should compare with row_num 1 and if it is matching it should say “No” and if it is not matching like row_num 3 compare with row_num 2 then it should say “Yes”.Can you please help me to write SQL statement to achieve it. I tried self join but then it is returning me 12 records with incorrect data.The final output I am expecting is as below,Hope you can help me with this.Thanks in advance. Regards,Abhishek Read More