I need to find a way to compare the nth row of data to (n-1)th row or nth row to (n+1)th row in Rapid SQL

53 Views Asked by At

I need to find a way to compare last row of data to the previous row or the 1st row data to the 2nd row so as to select specific data that have same values in the rows, in Rapid SQL.

My table looks like this..

ID. ACTION FEEDBACK LANGUAGE
112211 AA ERROR ABC
112211 AA ERROR ABC
112211 AB ERROR ABC
112222 AB ERROR ABC
112222 AA ERROR ABC
112222 AB ERROR ABC

Output should be like:

ID Action Feedback Language
112211 AA ERROR ABC
112222 AB ERROR ABC
0

There are 0 best solutions below