Here's the query:

```
SELECT h.idhour, h.`hour`, outnumber, count(*) as `count`, sum(talktime) as `duration` 
FROM (
     SELECT 
        `cdrs`.`dcustomer` AS `dcustomer`,
        (CASE
            WHEN (`cdrs`.`cnumber` like "02%") THEN '02'
            WHEN (`cdrs`.`cnumber` like "05%") THEN '05'
        END) AS `outnumber`,
        FROM_UNIXTIME(`cdrs`.`start`) AS `start`,
         (`cdrs`.`end` - `cdrs`.`start`) AS `duration`,
         `cdrs`.`talktime` AS `talktime`
    FROM `cdrs`
    WHERE `cdrs`.`start` >= @_START and `cdrs`.`start` < @_END
    AND `cdrs`.`dtype` = _LATIN1'external'
    GROUP BY callid
   ) cdr 

   JOIN customers c ON c.id = cdr.dcustomer
   LEFT JOIN hub.hours h ON HOUR(cdr.`start`) = h.idhour

    WHERE (c.parent = _ID or cdr.dcustomer = _ID or c.parent IN 
        (SELECT id FROM customers WHERE parent = _ID))

   GROUP BY h.idhour, cdr.outnumber
   ORDER BY h.idhour;

```

The above query results skips the hours where there is no data, but I need to show all hours (00:00 to 23:00) with null or 0 values. How can I do this?