Select the first entry from grouped data

@Patse first() has a column parameter that defaults to _value. After pivoting your data, the _value column doesn’t exist. All you need to do is provide a column name to first that does exist:

//...
    |> first(column: "_time")