Skip to content

Instantly share code, notes, and snippets.

@RobAWilkinson
Created December 31, 2015 01:04
Show Gist options
  • Save RobAWilkinson/a4c1f317e285d33b4dc9 to your computer and use it in GitHub Desktop.
Save RobAWilkinson/a4c1f317e285d33b4dc9 to your computer and use it in GitHub Desktop.
SELECT start_date, duration
FROM assignments
WHERE start_date < '2016-01-26'
AND start_date + duration < '2016-01-26'
ORDER BY start_date DESC;
SELECT end_date, duration
FROM assignments
WHERE end_date > '2016-01-29'
AND end_date - duration > '2016-01-29'
ORDER BY start_date DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment