• Thank you for the suggestion about the Case statement Erland. Regarding my actual problem, it turns out that both approaches (my original and your suggested) return identical results.

    I investigated the issue further and it turned out that the results were correct and the counts returned did not have overlapping dates. I originally had used another sproc to validate the counts instead of the actual data and it turned out that the sproc I had used was not being called properly.