Starting with an ordered set of floating point values (the order matters) that can be retrieved with a simple query. I want to calculate sequential differences of values with a stored procedure. For instance,
if we have the values
1, 3, 7
the result should be
2, 4
What is the easiest way to do this with a stored procedure (Mysql 5)?
Something like this might work: