Select CreatedDate,[1],[2],[3],[4],[5],[6],[7],
,[9],[10],[11],[12],[13],[14],[15],[16],[17],[18],[19],[20],[21],[22],[23],[24]
from
(
Select ID,FileName,CreatedDate,DATEPART(hour,CreatedDate)Hourly
from Table
)P
PIVOT
( COUNT(FileName) for Hourly in ([1],[2],[3],[4],[5],[6],[7],
,[9],[10],[11],[12],[13],[14],[15],[16],[17],[18],[19],[20],[21],[22],[23],[24])) as HourlyFilecount