Monthly Date and Hour wise report generation using PHP MYSQL
How to get data without dates which are not recorded?


This is a common problem.  The generic solution is


Build a table with all possible dates (at least in the range needed).
LEFT JOIN from that table to your table.  (Or, if it is a complex query, then use a derived table:  LEFT JOIN (SELECT ...) AS x  ON dates.day = x.day.
If desired, use COALESCE(...) to turn NULLs into 0s or blanks.