Or in words: There is an overlap if meeting A starts before meeting B ends and meeting A ends after meeting B starts.
So the scenario described looks way more complex as it actual seems to be.
Or in words: There is an overlap if meeting A starts before meeting B ends and meeting A ends after meeting B starts.
So the scenario described looks way more complex as it actual seems to be.
Those two time periods do overlap mathematically, but not physically: they share the common point of "4", even if that point has duration 0.
I know the iCal standard goes into this for a bit.
meeting_a.starts_at <= meeting_b.ends_at && meeting_b.starts_at <= meeting_a.ends_at
So, indeed, the scenario as described in the article is more complex than needed.
SELECT * FROM meetings, new_meetings WHERE new_meetings.starts_at<meetings.ends_at AND new_meetings.ends_at>meetings.starts_at;
After you're done with that corner case, you may find it better to determine if they don't overlap and negate that.