I wish to write a query for below problem.
the problem is, I want to eliminate all overlapping periods, so that I get the total amount of time which is not taken in a