pivot on date and count values by hour
Ok, so after few trial and error queries I managed to solve this.

It may not be the best way but it seems to work fine.

select *
from 
(
  select CAST([datetime_received] as date) AS ForDate,   DATEPART(hour,[datetime_received]) AS OnHour,     COUNT(*) AS Totals
  from [claims]
  where [datetime_received] between '2019-07-01 00:00:00.000' and '2019-07-31 23:59:00.000'
  GROUP BY CAST([datetime_received] as date),
       DATEPART(hour,[datetime_received])


) src
pivot
(
  sum(Totals) 
  for OnHour in    ([0],[1], [2], [3],[4], [5], [6],[7],[8], [9], [10],[11], [12], [13],[14], [15], [16],[17],[18], [19],[20],[21], [22], [23]) 
) piv 
order by ForDate


If any one can help me refine this i will appreciate it.

Thanks