G
Guest
is it possible to compare values in 2 different rows? for example if the
query returns this:
1 | $5.00
2 | $6.00
3 | $20.00
4 | $30.00
i want to find out the cost difference between 1 and 2 which will be $6-$5
and then 2 and 3 which will be $20-$6 and so on. how can i make this happen
in SQL? any suggestions?
query returns this:
1 | $5.00
2 | $6.00
3 | $20.00
4 | $30.00
i want to find out the cost difference between 1 and 2 which will be $6-$5
and then 2 and 3 which will be $20-$6 and so on. how can i make this happen
in SQL? any suggestions?