# Last() odd behavior, InfluxDB OSS 2.0.3

**URL:** <https://community.influxdata.com/t/last-odd-behavior-influxdb-oss-2-0-3/18174>\
**Category:** InfluxDB 2\
**Created:** [February 4, 2021, 11:43am UTC](https://community.influxdata.com/t/last-odd-behavior-influxdb-oss-2-0-3/18174 "2021-02-04T11:43:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alqird](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/alqird/32/6593_2.png) [@alqird](https://community.influxdata.com/u/alqird)\
**Post date:** [February 4, 2021, 11:43am UTC](https://community.influxdata.com/t/last-odd-behavior-influxdb-oss-2-0-3/18174/1 "2021-02-04T11:43:31Z")

</div>

Hi,  
Given test data with measurement `m`, series `srs`, from 2021-01-01T00:00:00Z to 2021-02-01T00:00:00Z, every 1 minute.  
When I execute a query like this:

```
from(bucket: "b1")
  |> range(start: 2021-01-01)
  |> filter(fn: (r) => r._measurement == "m" and r._field == "srs")
  |> last()

```

I don’t get the last record but the record with `_time` = 2021-01-03T23:59:00Z.  
Furthermore when I change the range start to the time of the next record after the above result `_time` (2021-01-04T00:00:00), the result is 2021-01-10T23:59:00Z. And so on.

It reveals that `last()` returns the last record not greater than the nearest Sunday 23:59:59.99999 after the range start.  
But when I put column argument to the `last()` function other than default `_value` everything works as expected.  
The aforementioned problem doesn’t run on InfluxDB Cloud 2.0.

Thanks
