I have the following table:

```
ID  User  Form  Depth
1   A     ABC   2001
1   A     XYZ   1001
1   B     XYZ   1003
1   B     DEF   3001
1   C     XYZ   1000

```

If ID and Form are identical, I need to identify those rows that are +-2 from User A. Using the example above, the script would return:

```
ID  User  Form  Depth
1   B     XYZ   1003
1   C     XYZ   1000

```

I already have a script which identifies rows with identical ID and Form--I just need the other part, but I'm struggling with figuring out the logic. I was hoping there was some kind of DIFF function I could use, but I can't find one for SQL Anywhere.

Does anyone have any suggestions?

Thanks!