Different Time Values in one Graph

Hey Everybody,

sry for my English.

I have two counters that are written to the database with different time intervals.
I would like to compare the consumption per day in general in a common graph.

Unfortunately, the result has not been good so far

############################ MSSQL Query
SELECT
__timeEpoch(DATUM), stand - lag(stand,1) over (order by DATUM) as Verbrauch_Gesamt FROM ZM_ZAEHLWERK_STAND_DT WHERE __timeFilter(DATUM) AND
ZAEHLWERK_ID = (SELECT TOP 1 ZAEHLWERK_ID FROM ZM_ZAEHLWERK_DT WHERE NUMMER= ‘10040193’ AND AKTIV= 1)
ORDER BY
DATUM
############################
How can I get Grafana to calculate values ​​from 0 to 0 o’clock regardless of the amount of data records in between?

I would be very grateful for help.
Many thanks in advance.

pmolke