|
|
-
The challenge is to find the minimal set of intervals without creating gaps.
There is a table with groups of redundantly 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. The first and last date intervals in a group are considered the anchor intervals and must always be present.
If there are multiple solutions for a group you must choose the one where the number of date intervals is a minimum.
If there are still multiple solutions for a group you must choose the one where the sum of the date intervals is a minimum.
If there are still multiple solutions for a group you must choose the one based on an order by start date 1, start date 2,
etc of the solutions, where 'start date 1' is the lowest start date value of each solution, 'start date 2' is the next lowest
start date value of each solution, etc.
|
-
The challenge idea is taken from a problem discussed in the MSDN TSQL forum.
The challenge is to find the Islands(gaps) in sequential dates. You need to write a query to
identify continuous intervals from the start date and end date.
For example,
01/01/2012 - 01/17/2012
01/18/2010 - 02/20/2012
The above two intervals should be considered as
01/01/2012 - 02/20/2012
|
-
The challenge idea is taken from a problem discussed in the MSDN TSQL forum.
The database field contains long string with data for Quantity and Parts.
The challenge is to parse the data into separate (Quantity and Parts) fields for displaying in a report.
The Quantity of Parts is placed before the hyphen (-) and the Part number after the hyphen.
If there is more than one part, each part is separated by a semi-colon and space.
|
-
In a large project management application, there is a category of resources which are managed in a special way.
During the planning phase you have an activity with a planned start date and a planned finish date and a monthly
sequence of estimated effort values for one or more resources. A period always refers to a real calendar month with
period 1 being the month of the planned start date. But the first period and last period may not use up a full month.
|
-
The challenge is to identify the sequence of accounting transactions.
|
-
The challenge is to find the Episode and Sequence based on interval.
|
-
This challenge is based on a problem discussed in the MSDN TSQL forum.
The challenge is to create a query for a report that shows expiring material.
There is a table with material that has expiry dates.
Another table holds requests for the expiring material.
You need to show how much material will be expiring because there are no requests in the queue for it.
|
-
The challenge is to wrap the text by specified position. The key point is you are not allowed
to break the word. When the wrapping position is in between the word, you should wrap the text by the space before the word.
When the first word in sentence is longer than the postion specified to wrap, the word should be wrapped by appending dash (-) to the word.
|
-
This challenge invites you to solve a payroll challenge which requires to calculate the number of hours employee worked
in a week.
|
-
Many of you must have played the 'mangled words' game in the school. Here is a challenge that gives you an opportunity to play it once again using TSQL.
Your task is to process the input table that contains several mangled words and try to 'un-mangle' them and validate them against a 'dictionary' table. You might be able to create more than one correct word from some of the input strings. It is also possible that a mangled word is completely incorrect and no valid word can be created from it.
As an example, given "xtet", the valid word that can be formed is "text".
|
|