here's my problem: I want to compare an observation in the second row with an observation in the first row. E.g :
fruit Fruit1 (I want to create that variable)
1 orange apple
2 apple banana
I know with the LAG() function you can compare with the next row. Is there any function doing the same thing but with the previous row??