Influxdb not sorting by time (cannot group float and string types together)

I want to sort rows by time. Below query is throwing error called runtime error @9:6-9:30: sort: schema collision: cannot group float and string types together. I do not want to group anything. This is why I use group().

My query:

from(bucket: "plc-metrics")
  |> range(start: 1707288974, stop: 1709794574)
  |> filter(fn: (r) => r._measurement == "PLC_Sim03e162698dc1aa4f-status"  or r._measurement == "PLC_Sim03e162698dc1aa4f-total_count"  or r._measurement == "PLC_Sim03e162698dc1aa4f-good_count"  or r._measurement == "PLC_Sim03e162698dc1aa4f-speed"  or r._measurement == "PLC_Sim03e162698dc1aa4f-operator" )
  |> group()
  |> sort(columns: ["_time"])

Screenshot of data:

Hello @Can_Berk_Sanal,
Your schema’s have to be the same as the error indicates.
I would try adding:

Before the group()

Also these could be helpful:

InfluxDB returns data sorted by time when you just perform from range filter :slight_smile:

Hello Anais, can you explain further about this statement:

I’m currently experiencing the same issue about group. I didn’t want my query to be grouped by tags, and expecting it to be sorted by time, so the tags could be mixed order.