I have a query that generate following output:
| columnA |
-----------
| 5 |
-----------
| 2 |
-----------
| 3 |
-----------
| 4 |
-----------
Is there a solution that I could generate another column which is exactly the same as columnA (lets put a name for it - columnB), and having value from columnA that moving downward. Below is the expecting output:
| columnA | columnB |
---------------------
| 5 | 0 | -> put zero for 1st row
---------------------
| 2 | 5 | -> original value from 1st row of columnA
---------------------
| 3 | 2 | -> original value from 2nd row of columnA
---------------------
| 4 | 3 | -> original value from 3rd row of columnA
---------------------
That's about my question.