Sql Server related question

Posted by stefan on Stack Overflow See other posts from Stack Overflow or by stefan
Published on 2010-04-21T16:10:59Z Indexed on 2010/04/21 16:13 UTC
Read the original article Hit count: 165

Filed under:

Hi guys,

I have this thing that i need to do and some advices will be greatly appreciated. I have a Sql server table with some phone calls.For each phone call i have the start and end time. What i need to accomplish: a stored procedure which for a certain period of time, let's say 5 hours at a x interval, lets say 2 minutes returns the number of connected calls.

Something like:

Interval                                    Nr of Calls Connected
01-01-2010 12:00:00 - 01-01-2010 12:05:00   30
01-01-2010 12:05:01 - 01-01-2010 12:10:00   10
.............

Which will be the fastest way to do that? Thank you for your help

© Stack Overflow or respective owner

Related posts about sql-server