Influx Query - return number of unique series in measurement

Hi,
I am using influxDB 1.8 and am struggling to find a query that I can use in the influxdb client tool to return the number of unique series in a measurement. I tried the following query, but it does not work on measurements that contain a lot of data:

Select count(“count”) from (select count(Value) from measurementName group by “Id”)

Does anyone know of a query that can be used to get the total number / count of unique series in a measurement?

For anyone else who might be interested, this query seems to work:
SHOW SERIES CARDINALITY

More info/ background:
“Series cardinality is the number of unique database, measurement, tag set, and field key combinations in an InfluxDB instance.
For example, assume that an InfluxDB instance has a single database and one measurement. The single measurement has two tag keys: email and status . If there are three different email s, and each email address is associated with two different status es then the series cardinality for the measurement is 6 (3 * 2 = 6)” (https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/)

1 Like