Sorry. As I read the post again, I saw, that the timepoints are very different. I expected that both queries will start with similiar time points. But they dont. Later datapoints show the mean values
If I understand what you are asking correctly - surely you would expect any values in the first 10 minutes of your query not to return anything since there can be no mean until there are 10 minutes worth of data?
If @TotallyInformation's suggestion is not it, then what local time was it when you ran the queries? What timezone are the machine running node red and (if different) the machine running the browser?
To be more clear. Without aggregate function, the result of the query starts with the first value in the database. Which results in "only" ~15 hours of data, even I asked for the last 24 hours (time>now()-1d). Thats ok, as that are all the data in the db at this time. But with aggregate function, the query results with 24 hours of data (null for the first 9 hours), with the same WHERE clause. I would have also expected, that only 15 hours of data would be in the result. As the db is growing, thats not really a problem, but I was irritated in the beginning, why I have "only" nulls in my results not looking on the timestamp. Thats why I started the thread, which was "resolved" with my first answer seeing the different timestamps.