Okay, I used your earlier script to create a table of dates called "days" from 1 - 31. The following is at the beginning of the query:
select h.id,coalesce(DayPart,0) as Date,coalesce(Hourpart,0) as Hour ,coalesce(Countpart,0) as Data
from (select datepart(dd,DateTime) as DayPart...