After using the pivot function, using the count function results in an error. How can I correctly retrieve the result? Is there a more efficient way to find the number of rows after the row-to-column transformation?
runtime error @7:8-7:15: count: column “_value” does not exist
from(bucket: “init”)
|> range(start: -25h)
|> filter(fn: (r) => r[“_measurement”] == “ioe_testdb3”)
|> group(columns: [“driverid”])
|> sort(columns:[ “_time”], desc: true)
|> pivot(rowKey:[“_time”,“deviceid”], columnKey: [“_field”], valueColumn: “_value”)
|> count()