Hi all,
I want to get the number of total records in a table. When I use count() function, influxdb returns the result grouped by tags. How can I get only the total number?
Best Regards
Fu
Hi all,
I want to get the number of total records in a table. When I use count() function, influxdb returns the result grouped by tags. How can I get only the total number?
Best Regards
Fu
You can flatten the series into a single table and count with |> group() |> count()
Hi rawkode,
Thank you for your reply. I tried your suggestion. But the result is: An internal error has occurred
the script is:
from(bucket: “IotDeviceData”)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: ® => r._measurement == “device_data_realtime”)
|> group()
|> count()
And if I remove the last line “|> count()” the result is OK.