| Item ID | Begin | End | TestDate | Construction |
| 1000 | 0 | 1 | 1998 | 2000 |
| 1001 | 0 | 5 | 2001 | 2000 |
| 1002 | 1 | 4 | 1998 | 2000 |
| 1003 | 4 | 5 | 1998 | 2000 |
| 1004 | 3 | 5 | 2005 | 2000 |
Requirments include:-
- I would like to segment the dataset to eliminate records with older TestDate to Construction date
- Output table should be non overlapping (begin/end)
Should look like below:-
| Item ID | Begin | End | TestDate | Construction |
| 1001 | 0 | 3 | 2001 | 2000 |
| 1004 | 3 | 5 | 2005 | 2000 |
| 1002 | 5 | 7 | 1999 | 1998 |
Thanks