SQL Clone
SQLServerCentral is supported by Redgate
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.


Total article views: 1506 | Views in the last 30 days: 1
Related Articles

Calendar Table by Interval Minutes

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


Intervals Part 1 - Definitions and Terms

Learn the basic terms and definitions for intervals in SQL Server.


sql time intervals problem

sql time intervals problem


Time intervals

Creating time intervals on overlapping events


Time Intervals

Who is logged on in 15 minute intervals