Take it a few steps farther:
SELECT
Count(Id),
DATEPART(year, DateCreated) As yr,
DATEPART(month, DateCreated) As mth,
DATEPART(day, DateCreated) As day,
DATEPART(Hour, DateCreated) as hr,
DATEPART(minute, DateCreated) as mnt
FROM
MyReportTable
WHERE DateCreated between '5/4/2011' and '5/18/2011'
and SourceType = 'File'
GROUP BY
DATEPART(year, DateCreated),
DATEPART(month, DateCreated),
DATEPART(day, DateCreated),
DATEPART(Hour, DateCreated),
DATEPART(minute, DateCreated)
ORDER BY
DATEPART(year, DateCreated),
DATEPART(month, DateCreated),
DATEPART(day, DateCreated),
DATEPART(Hour, DateCreated),
DATEPART(minute, DateCreated)
Edit
To get to a 15 minute resolution, change the last column to
(DATEPART(minute, DateCreated)/15)
(add +1 to that in the select to get 1,2,3,4).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…