I want to find the precent change in two values from a mysql database.
I have a cron job set up to insert values approximately every hour..
Each value has a unix timestamp associated with it and I want to get the previous days(~24hrs) value and compare with the current one to get percent increase or decrease.
Table looks like this:
+-----+----+
|value|time|
+-----+----+
You’d need to sum the values from day 1 and day 2, yes? This would give you the change between readings by calendar day.