• It sounds to me like you're after the number of units picked per hour for a specific period of time. It reminds me of a shop floor productivity report. Is this correct? If so, simply subtract the times and divide the quantity by the difference. This example uses the difference in minutes for precision.

    with times as (

    select dateadd(minute, -90, getdate()) starting_time,

    GETDATE() ending_time,

    14 quantity

    union all

    select dateadd(hour, -2, getdate()) starting_time,

    GETDATE() ending_time,

    160 quantity)

    select starting_time, ending_time, quantity,

    convert(numeric(12, 6), DATEDIFF(minute, starting_time, ending_time)) / 60 hours,

    round(quantity / convert(numeric(12, 6), DATEDIFF(minute, starting_time, ending_time)) * 60, 3) uph

    from times;

    Am I over-simplifying this?