6

Since there is no way to delete points by field values in InfluxDB, I'd like to get a count of all the points, SELECT INTO excluding the points with unwanted values, then get a count of the second measurement.

However,

SELECT COUNT(*) FROM measurement1

returns an array of counts for each field and tag, which doesn't tell me how many data points there are total.

Community
  • 1
  • 1
Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404

2 Answers2

4

It seems there is currently no way to do this without knowing a name of a column/value that is present in all points.

Although time is always present in all points, it is unfortunately not possible to do count(time) for now, either.

This issue addresses the problem, but it is closed and a bit outdated. Someone should open a new one because the problem is still there.

Bloke
  • 2,229
  • 3
  • 22
  • 27
-3

use this command

SHOW SERIES CARDINALITY

works for tag

Inasa Xia
  • 433
  • 5
  • 12
  • 2
    Cardinality isn't directly related to the number of data points in a measurement. You could have a trillion data points and a cardinality of 1. – CornSmith Jan 23 '20 at 22:33