Hi,
I have been playing around with B4Android and a SQLite database and was wondering how I would go about creating a query which would return the difference between dates of adjacent table rows?
So in the example below I would want to be able to calculate the number of days since the previous order for each order date (so the DaysSince column).
Table: Result
Date | Test | DaysSince
20120819 | 4 | 1
20120818 | 7 | 3
20120815 | 4 | 5
20120810 | 6 | NULL
I presume I need to use the julianday function and then some special SQL?
Thank You
I have been playing around with B4Android and a SQLite database and was wondering how I would go about creating a query which would return the difference between dates of adjacent table rows?
So in the example below I would want to be able to calculate the number of days since the previous order for each order date (so the DaysSince column).
Table: Result
Date | Test | DaysSince
20120819 | 4 | 1
20120818 | 7 | 3
20120815 | 4 | 5
20120810 | 6 | NULL
I presume I need to use the julianday function and then some special SQL?
Thank You
Last edited: