Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

TSQL Challenge 53 - Finding empty and non-empty intervals

By Jacob Sebastian,

TSQL Challenge 53 - Finding empty and non-empty intervals among many start-end intervals

A SQL Server instance is set up to log the session start time and end time into a table. Given this table, your job is to find all time intervals in which no one is logged in. For the intervals separated by these empty intervals show the maximum number of simultaneous users.

http://beyondrelational.com/blogs/tc/archive/2011/04/04/tsql-challenge-53-Finding-empty-and-non-empty-intervals-among-many-start-end-intervals.aspx

Total article views: 1498 | Views in the last 30 days: 4
 
Related Articles
SCRIPT

Calendar Table by Interval Minutes

Populate a calendar table with user set interval start and end datetime values.

FORUM

Time intervals

Creating time intervals on overlapping events

FORUM

sql time intervals problem

sql time intervals problem

FORUM

Time Intervals

Who is logged on in 15 minute intervals

FORUM

TSQL Challenge 53 - Finding empty and non-empty intervals

Comments posted to this topic are about the item [B]TSQL Challenge 53 - Finding empty and non-empty ...

Tags
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones