Add time serries to SQL data

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

test

Welcome

What are you using for that visualization?

im using table as data visualization

How are you getting 2 time columns?

ahh… I’m using a second query for the time display on the left just to check the data:
SELECT
UNIX_TIMESTAMP(create_date) DIV 3600 * 3600 AS “time”
FROM tbl_event
WHERE create_date >= (curdate()) - INTERVAL +1 DAY
GROUP BY 1
ORDER BY $__timeGroup(create_date,1h)

just for checking

1 Like

how are you getting time only? what transformation are you using?

im just using the code above nothing else