I have a table that contains the following intervals of big integers:
start_point | end_point |
---|---|
4999999995 | 4999999995 |
5000000000 | 5000000009 |
5000000000 | 5099999999 |
5000000010 | 5000000010 |
5000000011 | 5000000025 |
5000000026 | 5000000045 |
5090090903 | 5090090903 |
6000000000 | 6000000000 |
What I need is a TSQL query that merges these intervals, so they would be disjoint without any overlaps. In this case the result I am looking for is
start_point | end_point |
---|---|
4999999995 | 4999999995 |
5000000000 | 5099999999 |
6000000000 | 6000000000 |