Hi,
Please help me to acheive this requirement.
Input:
| id | Value |
| 1 | 100 |
| 2 | 200 |
| 3 | 300 |
| 4 | 400 |
| 5 | 500 |
Output:
| id | Value | Pre | Nxt |
| 1 | 100 | 0 | 200 |
| 2 | 200 | 100 | 300 |
| 3 | 300 | 200 | 400 |
| 4 | 400 | 300 | 500 |
| 5 | 500 | 400 | 0 |
| id | Value |
| 1 | 100 |
| 2 | 200 |
| 3 | 300 |
| 4 | 400 |
| 5 | 500 |
| id | Value | Pre | Nxt |
| 1 | 100 | 0 | 200 |
| 2 | 200 | 100 | 300 |
| 3 | 300 | 200 | 400 |
| 4 | 400 | 300 | 500 |
| 5 | 500 | 400 | 0 |
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Jenith ThakkarPosted Jul 25, 2018, 2:17 AM