Właściwie musisz zaokrąglić TimeStamp
do godziny. W SQL Server jest to trochę brzydkie, ale łatwe do zrobienia:
SELECT dateadd(hour, datediff(hour, 0, TimeStamp), 0) as TimeStampHour, Count(*)
FROM [TEST].[dbo].[data]
GROUP BY dateadd(hour, datediff(hour, 0, TimeStamp), 0)
ORDER BY dateadd(hour, datediff(hour, 0, TimeStamp), 0);