Created
March 2, 2020 08:21
-
-
Save easternnl/93dfb2699f5ab27924dcaed83140134d to your computer and use it in GitHub Desktop.
SQLite DateTime table with min and max
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH RECURSIVE dates(datetime) AS ( | |
VALUES('2015-10-03 08:00:00') | |
UNION ALL | |
SELECT datetime(datetime, '+1 second') | |
FROM dates | |
WHERE datetime < '2015-10-03 10:00' | |
) | |
SELECT datetime FROM dates; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment