M
Madhu Gangaiah
I need to find the Maximun Number of Call for the Time Frame, My table
is like this
Create Table Call
( callid varchar(10), TimeStart Datetime, TimeEnd Datetime)
Insert into call values('1001', '2003-07-14 00:22:27', '2003-07-14
00:27:20')
Insert into call values('1002', '2003-07-14 01:25:47', '2003-07-14
01:32:27')
Insert into call values('1003', '2003-07-14 01:35:22', '2003-07-14
01:45:22')
Insert into call values('1004', '2003-07-14 03:55:57', '2003-07-14
03:59:27')
Insert into call values('1005', '2003-07-14 05:05:21', '2003-07-14
05:21:29')
Insert into call values('1006', '2003-07-14 07:07:20', '2003-07-14
07:22:27')
Insert into call values('1007', '2003-07-14 08:15:00', '2003-07-14
08:22:27')
output should be like
TimeFrame NoofCalls
1:00 - 2:00 2
Time Frame - Time Period like 1:00 AM to 2:00 AM
is like this
Create Table Call
( callid varchar(10), TimeStart Datetime, TimeEnd Datetime)
Insert into call values('1001', '2003-07-14 00:22:27', '2003-07-14
00:27:20')
Insert into call values('1002', '2003-07-14 01:25:47', '2003-07-14
01:32:27')
Insert into call values('1003', '2003-07-14 01:35:22', '2003-07-14
01:45:22')
Insert into call values('1004', '2003-07-14 03:55:57', '2003-07-14
03:59:27')
Insert into call values('1005', '2003-07-14 05:05:21', '2003-07-14
05:21:29')
Insert into call values('1006', '2003-07-14 07:07:20', '2003-07-14
07:22:27')
Insert into call values('1007', '2003-07-14 08:15:00', '2003-07-14
08:22:27')
output should be like
TimeFrame NoofCalls
1:00 - 2:00 2
Time Frame - Time Period like 1:00 AM to 2:00 AM