• Am I the only one who copied the code directly and got 3 different result sets for each query?

    Granted I used RedGate to generate 500,000 rows in the example table, but I got 699 Rows with the first example, 101 Rows with the 2nd and 102 rows with the 3rd.

    I limited the generation of data to have 100 products and dates to reside in 2 years.