This is similar but not equal to my previous question That was about how to summarize log-items per day. I use this SQL.
SELECT
[DateLog] = CONVERT(DATE, LogDate),
[Sum] = COUNT(*)
FROM PerfRow
GROUP BY CONVERT(DATE, LogDate)
ORDER BY [DateLog];
Now I want to improve that to summarize over an arbitary time period. So instead of sum per day, sum per hour or 5 minutes. Is this possible ?
I use SQL Server 2008 R2