Instruction
Great! PostgreSQL has also another useful operator – OVERLAPS:
(start1, end1) OVERLAPS (start2, end2)
As you may guess, it yields true when the two time periods (defined by their endpoints) overlap, and false when they don't.
The OVERLAPS operator works great with intervals too:
(start1, interval) OVERLAPS (start2, interval)
Exercise
Let's see what aircraft were used while the Boeing 777-300 (ID of 8) was flying. In this exercise, just run the template query.
Note that you won't see aircraft that are still in use (those of NULL value in the withdrawn_timestamp column). We will learn how to show them in the next part of the course.



