Hello All!
I am using mysql and python together. I have a table with only two columns: Number and Price. It looks something like this:
Number, Price
1, 10
2, 13
3, 19
4, 12
etc.
This continues for 90 rows until the Number values restart at 1, however the Price values keep changing. In all there are 900 rows.
What I would like to do is take the Price at all Number 2 and subtract that from the Price at Number 5. Then take the Price at Number 4 and subtract that from the Price at Number 5. If both of these numbers are positive or both are negative, I would like to store that number and move onto the next set of 90 Numbers. If They are both not positive or both not negative, then I would like to move on to the Price at number 5 subtract that from the Price at Number 6, Now check if this number has the same sign as the difference between Number 2 and Number 6.
So in all there should be a string of 10 values, one from each set of 90 numbers.
Any help at all will be greatly appreciated!
Thank you,
Ron Parker