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

TSQL Challenge 80 - Find the minimal set of intervals without gaps

By Jacob Sebastian,

TSQL Challenge 80 - Find the minimal set of intervals  without creating gaps

The challenge is to find the minimal set of intervals without creating gaps.

There is a table with groups of overlapping date intervals where each group has no gaps. Given this table, your job is to find the minimum set of date intervals without creating gaps in the group. A solution is defined such that if you remove any one of the intervals in the solution you will create a gap.

http://beyondrelational.com/puzzles/challenges/114/find-the-minimal-set-of-intervals-without-creating-gaps.aspx

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

Aggregating Intervals

create intervals from effective dates and aggregate like and adjacent intervals

FORUM

Creating a Group on Data

Creating a group on data without a easy relationship

ARTICLE

Minimal Logging

This article discusses minimal Logging in SQL Server.

FORUM

Time intervals

Creating time intervals on overlapping events

FORUM

sql time intervals problem

sql time intervals problem

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