Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)

  • RE: Get the max out of a series of periods

    hmmm, both queries return nothing.

    Gonna look deeper into this.

    Can you explain me how this works:      GROUP BY   d.ID / @DateRange

  • RE: Get the max out of a series of periods

    Good point, actualy it would look like this:

    01-01-2006 - 02-01-2006 (2days) Sum for SKU A = 90

    03-01-2006 - 04-01-2006 (next 2days) Sum for SKU A = 70

    05-01-2006 - 06-01-2006 (next...

  • RE: Get the max out of a series of periods

    It's a bit more complicated. I forgot to mention some details.

    Here is some data:

    Date---------------SKU------Value

    ------------------------------------

    01-01-2006..............A.........20

    01-01-2006..............B.........20

    02-01-2006..............A.........30

    02-01-2006..............A.........40

    02-01-2006..............B.........10

    04-01-2006..............A.........20

    04-01-2006..............A.........50

    05-01-2006..............A.........40

    05-01-2006..............A.........10

    Now suppose my daterange is 2 days, so in the above table i need to get the...

Viewing 3 posts - 1 through 3 (of 3 total)