Hi All -
The following will return the average sales for the date range, but I'm looking for SQL to determine the average sale per hour?
select convert(varchar,closingtime,106),sum(customercount) Customer_Count, sum(salesplustax)+sum(returns) Tax_Returns,sum(sales)+sum(returns) Sales_Returns, (sum(sales)+sum(Returns))/sum(customercount) Average from batch where closingtime between '2008-05-09' and '2008-05-13' and customercount 0 group by (closingtime)