I have an Access .mdb database with a Table that looks similar to:
+---------+------+--------+
| date | value |
+---------+------+--------+
|2011-05-04 12:00 | 45.9 |
|2011-05-05 12:00 | 21.2 |
|2011-05-06 12:00 | 32.2 |
|2011-05-07 12:00 | 30.4 |
|2011-05-08 12:00 | 40.4 |
|2011-05-09 12:00 | 19.8 |
|2011-05-10 12:00 | 29.7 |
+-------+---------+-------+
I would like to create a query that will return values that are derived from subtracting one value from a previous day value.
For example: The query would calculate
(21.2-45.9) and return -24.7
(32.2-21.2) and return -11.0
(30.4-32.2) and return -1.8
etc
How can I accomplish this in a SELECT statement?
Here’s the query that worked for me:
Thanks again, Tom H.