Why does aggregateWindow return three results for a period that should only contain two?

I’m assuming this is due to a truncation behaviour, but given a query roughly in the form:

    |> range(start: -6d)
    |> aggregateWindow(every: 3d, fn: sum)

why do I end up with three rows?

e.g. running this today (1st of December) gives me rows with a _time column

2022-11-27 00:00:00 GMT
2022-11-30 00:00:00 GMT
2022-12-01 15:25:22 GMT

What I want to get is two values - one for the last three days (or whatever period) and one for the previous period of the same length. How can I achieve this?

Hello @Chris_Cooper,
I’m not sure.

import "array"

rows = [{_time: 2022-01-02, _value: 21.2}, {_time: 2022-01-04, _value: 23.8}]

array.from(rows: rows)
|> range(start: 2022-01-01, stop: 2022-01-07 )
|> aggregateWindow(every: 3d, fn: last)

This returns the expected results: 2 rows.

Can you please export some of your data and share it with me?
Thank you.