Created
November 23, 2015 21:51
-
-
Save binarycreations/45296e15c11e55cd5816 to your computer and use it in GitHub Desktop.
Find missing entries within a sequence of data
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 | |
days(day) AS ( | |
SELECT '2015-10-05T00:00:00Z' | |
UNION ALL | |
SELECT date(day,'+1 day') || 'T00:00:00Z' FROM days WHERE day < '2015-11-21T00:00:00Z' | |
) | |
SELECT day, picks.title, picks.date FROM days LEFT JOIN picks ON picks.date = days.day WHERE picks.date IS NULL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment