SELECT
    CONCAT(DATE(dumper_cycles.t_stamp), ' ', HOUR(dumper_cycles.t_stamp), ':00') AS StartTimestamp,
    CONCAT('H', TIMESTAMPDIFF(HOUR, DATE_FORMAT(dumper_cycles.t_stamp, "%Y-%m-%d %H:00:00"), DATE_FORMAT(NOW(), "%Y-%m-%d %H:00:00"))) AS Hour,

    SUM(dumper_cycles.ulc1 = 1) AS ULC1,
    SUM(dumper_cycles.ulc2 = 1) AS ULC2,
    SUM(dumper_cycles.ulc3 = 1) AS ULC3,
    SUM(dumper_cycles.ulc4 = 1) AS ULC4  -- <-- ADD THIS LINE

FROM dumper_cycles
WHERE (dumper_cycles.t_stamp BETWEEN :starttime AND :endtime)
GROUP BY HOUR(dumper_cycles.t_stamp);