I’m trying to make an hourly table but because there are some hours that don’t have a value then the hours are skipped, is there a way to make this query have a time series so that the skipped hours show a value of 0
here are the querrys:
SELECT
UNIX_TIMESTAMP(create_date) DIV 3600 * 3600 AS “time”,
sum(count) AS “Last Week”
FROM tbl_event
WHERE create_date >= “2022-07-25” AND create_date < “2022-07-27” AND
store_id = ‘fq01’ AND event_type = ‘In’
GROUP BY 1
ORDER BY $__timeGroup(create_date,1h)
and here are the screen shoot data from my sql database