Group_by week returns 0 for week with measurements, fixed with (1w,-3d)

Hi,

Hope the following helps someone else.

The query below had been working fine for years, with group_by(1w, 4d) as indicated in numerous posts.

However, there is one week this year for which the query (and five others with same grouping but different time series) seemingly produces non-sense, namely returning 0 or a close to 0 value.
This despite individual day values being calculated properly with group_by(1d).

I could fix it by using group_by(1w,-3d) instead.

SELECT difference(last("value"))  / 1000 FROM "energy" WHERE ("direction"::tag = 'input' AND "rate"::tag = 'high') AND time >= 1785621600000ms and time <= 1795991197690ms GROUP BY time(1w,-3d) ORDER BY time ASC tz('Europe/Amsterdam')