Growing daily engine starts

I have an engine that reports its total (absolute) number of starts. With the derivative function I can nicely get the starts for one day with following query:

SELECT derivative(distinct("value"), 1d) FROM "EngineStarts" GROUP BY time(1d)

The nature of this query is that I get the starts for one day, always at the end of the given day. During the course of the day, the derivative returns nothing.

What I would like to achieve is that also during the course of the day, the current number of starts are returned. Basically something like this pseudo query:

SELECT derivative(distinct("value"), "THE DAY SO FAR") FROM "EngineStarts" GROUP BY time("THE DAY SO FAR")

Any pointers would be appreciated

@Monk Have you tried the difference() function? This should allow you to do something like:

SELECT sum(difference("value")) FROM "EngineStarts" WHERE time > now() - 6h GROUP BY time(1d)

Does this query work for you?