• Not 100% sure what you need, but, for example, this gives sales for the latest quarter for >=7AM and <8AM:


    select *
    from TicketItem
    where s_item IN('Coffee', 'Espresso', 'Double Espresso', 'Decaf Espresso', 'Cappucino', 'Latte', 'Iced Coffee', 'sm coffee pot', 'lg coffee pot')
      and dt_when >= dateadd(quarter, datediff(quarter, 0, getdate()), 0)
      and hour(dt_when) = 7

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.