You can use the hour function (or datepart function) as follows:SELECT hour(item_time) AS Hour,COUNT(prdkey) AS countFROM Item_summaryWHERE Item_date BETWEEN '03/01/2011' AND '03/01/2011'GROUP BY hour(item_time)ORDER BY Hour ASC
If your data would span more than one day and you want to separate them by days as well, you would need to add the day also as inSELECT day(item_time) as [Day],hour(item_time) AS Hour,COUNT(prdkey) AS countFROM Item_summaryWHERE Item_date BETWEEN '03/01/2011' AND '03/02/2011'GROUP BY day(item_time),hour(item_time)ORDER BY Hour ASC