Query to show gaps between multiple date ranges

We have a nested field which is used to store date ranges that represent the occupancy of rooms.

Is there any way to formulate a query which can identify gaps in room occupancy?

The concrete example is that we would like to be able to find all the periods when the room is available for booking.

Many thanks.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.