influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

[feature request] Count of different tag values

Open TechniclabErdmann opened this issue 11 years ago • 28 comments

Hi together,

with the query

SHOW TAG VALUES WITH KEY = id 

I get a list of all different tag values of my database.

Now I need to count them. An example, there query above returns:

name:idTagValues
----------------------- 
id
myId1
myId2
myId3

I need the result "3". Is their any way to get it? I tried some possibilities but everything fails: An idea for further releases is to combine two queries, so the second one references at the first query's result:

SHOW TAG VALUES WITH KEY = id; SELECT count(id) FROM idTagValues

Any idea to realize my request?

Thanks :-)

TechniclabErdmann avatar Aug 20 '15 13:08 TechniclabErdmann

There's no way to do this currently.

beckettsean avatar Aug 20 '15 18:08 beckettsean

Maybe an idea for further release? I would love to see that I can reference to a query result from an other query.

TechniclabErdmann avatar Aug 21 '15 06:08 TechniclabErdmann

@The-Nik yes, I changed this to a feature request and left it open so we can discuss whether and when to implement this feature.

beckettsean avatar Aug 21 '15 17:08 beckettsean

This would be useful for us too +1

rvrignaud avatar Mar 23 '16 09:03 rvrignaud

+1 for us also. The only "workaround" is to store data as a tag and field. Seems wasteful.

larrywalker avatar Mar 24 '16 13:03 larrywalker

+1 would help us a lot

wojciechszela avatar May 16 '16 22:05 wojciechszela

I need this too

mouseratti avatar Jun 21 '16 07:06 mouseratti

+1

sbengo avatar Jun 21 '16 17:06 sbengo

+1.

kbespalov avatar Jul 08 '16 10:07 kbespalov

+1

wegel avatar Jul 13 '16 20:07 wegel

+1

saboteurkid avatar Jul 15 '16 05:07 saboteurkid

+1

binhnq94 avatar Jul 22 '16 07:07 binhnq94

+1

codepattern avatar Jul 27 '16 01:07 codepattern

+1

dstreppa avatar Aug 08 '16 07:08 dstreppa

+1

lpalm avatar Aug 20 '16 22:08 lpalm

+1

vw-d3 avatar Aug 23 '16 08:08 vw-d3

+1

ngong avatar Aug 30 '16 13:08 ngong

+1

supershal avatar Aug 30 '16 20:08 supershal

+100

gargooza avatar Aug 31 '16 16:08 gargooza

+1

StephenPCG avatar Sep 02 '16 09:09 StephenPCG