Why don't you use window functions (e.h. LEAD/LAG) to access the prior/following row?
For your scenario, you could also use a self-join.
Shouldn't be too difficult for you to find a fitting solution.
- Lars
Why don't you use window functions (e.h. LEAD/LAG) to access the prior/following row?
For your scenario, you could also use a self-join.
Shouldn't be too difficult for you to find a fitting solution.
- Lars