• For this date range technique, for the end date:

    nextrow.PriceStartDate AS EndDate

    I usually do:

    dateadd(day, -1, nextrow.PriceStartDate) AS EndDate

    Also truncate to midnight the start/end date and any date comparisons to the range