A_NO | B_NO | START_TIME | END_TIME |
---|
614 | 614 | 25-MAR-17:03:00:00 | 25-MAR-17:03:05:00 |
614 | 235 | 25-MAR-17:03:01:00 | 25-MAR-17:03:02:00 |
614 | 345 | 25-MAR-17:03:01:30 | 25-MAR-17:03:03:00 |
In my telecom domain project, I've a scenario wherein A_NO = B_NO happens to be the 1st record in a group ordered by start_time , it means A_NO initiates a conference call by bringing himself in. A_NO then brings in two other numbers (235 and 345 ) to the conference identified by 2nd and 3rd record respectively.. Also the start_time and end_time of records 2 and 3 overlap with the the 1st , therefore the 3 set of records collectively quantify as " conference call "
In the scenario below, the 2nd party (235) dials to 345 to bring him to the conference . This as well quantify conference call.
A_NO | B_NO | START_TIME | END_TIME |
---|
614 | 614 | 25-MAR-17:03:00:00 | 25-MAR-17:03:05:00 |
614 | 235 | 25-MAR-17:03:01:00 | 25-MAR-17:03:02:00 |
235 | 345 | 25-MAR-17:03:01:30 | 25-MAR-17:03:03:00 |
Could someone help with a SQL to identify conference call taking into consideration of all the above criteria's. Thank you!