I have a table that contains three fields: Top(int), Left(int), Text(varchar).
The data inside the table are as following:
Text X Y
1 1000 250
2 700 100
A 618 300
B 620 400
C 625 405
F 623 402
D 400 410
M 300 415
Z 304 418
I want to get all the "Text" where (X - previous X) < 10 and (Y - previous Y) < 10
The result in this case should be: B, C, F, M, Z
Is it possible to to do that with SQL?
Thank you in advance