I have a table of dates, each date represent a task, the task takes three days to complete. I want to select all the unbooked dates that doesn't intersects with another booked task. I've been trying and googling for three days now and I think it is time to ask for help.
date booked
=========== =======
2014-09-01 0
2014-09-02 1
2014-09-05 0
2014-09-10 1
2014-09-15 0
2014-09-16 0
2014-09-20 1
2014-09-25 0
The expected result:
date booked
=========== =======
2014-09-01 0
2014-09-15 0
2014-09-16 0
2014-09-25 0