I have a table which logs employee phone calls namely "start of call" and duration. I need to be able to find and list all instances where the employee was NOT on the phone for X minutes (let's say X=30). Only calls between 9AM and 4PM should be considered. The main purpose of the query is to identify all the 30 +minute blocks of time where there was no phone activity.
Sample of CALLS table:
3/1/12 09:00AM 3690
3/1/12 10:19AM 400
3/1/12 10:39AM 332
The output of the query or code would list the start time of the each "GAP" and the duration of the gap. There can be multiple gaps in one business day for the employee.
This solution can either be an MS Access code/query or SQL Server t-SQL