I am trying to create a query that will subtract the current row of a column from the previous row, and if the value is negative, just return the value of the current column in the result column. For example, if I had the table below, here are the results I would like to see:
Key value...