I have data polling every x hours and it is based on a liquid level. The level always rises.
I need to know how to work out the average increase over a week (per day).
So if days data reads 1000-1200-1300-1400 then we know the average increase is 100 per day.
DateReceived DeviceLevel Serial
1/mm/yyyy 3200 346
1/mm/yyyy 12000 222
2/mm/yyyy 3560 346
2/mm/yyyy 13600 222
Trying to use the
AVG()
function but to no evail.
You could use a self-join to find the level of the previous day. That gives you the increase for a day. An outer query could be used to find the average increase over a week: