Emp
表格中的数据:
NUM DEPT HIRED_SDT HIRED_EDT
--- ----- ------------------------------ ------------------------------
1 Sales October, 01 2012 11:00:00+0000 October, 01 2012 11:30:00+0000
2 Sales October, 01 2012 11:22:00+0000 October, 01 2012 12:40:00+0000
3 Sales October, 01 2012 13:00:00+0000 October, 01 2012 13:50:00+0000
4 CC October, 01 2012 14:00:00+0000 October, 01 2012 15:00:00+0000
5 CC October, 01 2012 15:00:00+0000 October, 01 2012 16:10:00+0000
6 CC October, 01 2012 16:00:00+0000 October, 01 2012 17:20:00+0000
期望的结果:
仅按部门分组的重叠时间范围
==> 例如。3 条记录中Sales
有 2 条重叠
NUM DEPT HIRED_SDT HIRED_EDT
--- ----- ------------------------------ ------------------------------
1 Sales October, 01 2012 11:00:00+0000 October, 01 2012 11:30:00+0000
2 Sales October, 01 2012 11:22:00+0000 October, 01 2012 12:40:00+0000
5 CC October, 01 2012 15:00:00+0000 October, 01 2012 16:10:00+0000
6 CC October, 01 2012 16:00:00+0000 October, 01 2012 17:20:00+0000