SQL how to sum events in one hour between two dates and show it in one row
问题 I am developing a report with C# and SQL server 2005, I have to only show how many hit we got in each hour. the table is very huge. output should look like this: Row# | Date | Time | Hit Count ----------------------------- 1 | 07/05/2012 | 8:00 | 3 2 | 07/05/2012 | 9:00 | 4 3 | 07/05/2012 | 10:00 | 0 4 | 07/05/2012 | 11:00 | 5 My table is look like this: "HitTime": 07/05/2012 08:02:24 07/05/2012 08:12:21 07/05/2012 08:23:00 07/05/2012 09:01:00 07/05/2012 09:08:14 07/05/2012 09:12:31 07/05