|
|
-
Peso Commented 1 Years ago through Puzzles | 1 Point
Or
1-10
5-24 (19 days)
22-30
|
-
Peso Commented 1 Years ago through Puzzles | 1 Point
For GroupID 1, why isn't this a valid solution?
1-10
4-26 (22 days, same as 4-20 + 15-21)
22-30
|
-
Peso Solved 1 Years ago through Puzzles | 5 Points
Better performance and nicer output
|
|
|
|
|
-
Peso Commented 1 Years ago through Puzzles | 1 Point
In the original sample data, how come Amount in the expected result is greater than the Amount in the Effort table? Bug?
11.1 1 2012-03-04 2012-03-01 48.9
12.1 1 2012-03-11 2012-03-01 61.1
Amount for Period 3 (March) is 50, but t
|
-
Peso Commented 1 Years ago through Puzzles | 1 Point
No. The idea is to encourage people to find better/different solutions.
By showing the reads, we display that there are other solutions.
|
-
Peso Commented 1 Years ago through Puzzles | 1 Point
Yes, the absence of a proper index affects all queries, bad as good.
But the difference is that a good query will using the index better and thus scale better than a bad query.
|
-
Peso Commented 1 Years ago through Puzzles | 1 Point
One pass is one access to each and one row (or page).
Self join or apply that "touches" same record twice or more is (with my definition) not a one-pass.
|
-
Peso Solved 1 Years ago through Puzzles | 5 Points
One pass solution (no recursion) and only one windowed function.
-- Data on Dishdy's 200k row samples
Table 'Worktable'. Scan count 0, logical reads 0.
Table 'TC75'. Scan count 1, logical reads 624.
SQL Server Execution Times:
CPU time = 484 m
|