calculatetimes
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| calculatetimes [2021/02/16 13:45] – wikiadmin | calculatetimes [2021/02/16 13:55] (current) – wikiadmin | ||
|---|---|---|---|
| Line 36: | Line 36: | ||
| 5|2015-01-01 13: | 5|2015-01-01 13: | ||
| 7|2015-01-01 13: | 7|2015-01-01 13: | ||
| + | </ | ||
| + | |||
| + | Last 24 hours: | ||
| + | <code sql> | ||
| + | SELECT x.*, time(Cast (( JulianDay(y.dt) - JulianDay(x.dt)) * 24 * 60 * 60 As Integer), ' | ||
| + | FROM my_table AS x | ||
| + | INNER JOIN my_table AS y | ||
| + | ON y.dt >= x.dt | ||
| + | WHERE x.status = ' | ||
| + | AND y.status = ' | ||
| + | | ||
| + | BY x.id; | ||
| </ | </ | ||
| A similar problem (with solution) is described here: | A similar problem (with solution) is described here: | ||
| https:// | https:// | ||
calculatetimes.1613501122.txt.gz · Last modified: by wikiadmin
