I have a collection which holds documents, with each document having a data observation and the time that the data was captured. e.g. { _key:...., "data":26, "timecaptured":1643488638.946702 }
where timecaptured for now is a utc timestamp.
What I want to do is get the duration between consecutive observations, with SQL I could do this with LAG for example, but with ArangoDB and AQL I am struggling to see how to do this at the database. So effectively the difference in timestamps between two documents in time order. I have a lot of data and I don't really want to pull it all into pandas.
Any help really appreciated.