Discussion:
[influxdb] Influxdb: count of distinct occurence of a field (not TAG)
y***@gmail.com
2018-04-16 11:56:28 UTC
Permalink
Would like to find a solution to get count of distinct values of a field from a measurement
select method, state, txn from MyMetric
name: MyMetric
time method state txn
---- ------ ----- ---
1523868188606010538 SaveGSTR4_Start Trigger_from ---
1523868188606044269 GenerateAckNumber Start ---
1523868188606054037 GenerateAckNumber Success TXN0000000000000622255
1523868188606063844 HeaderValidation Start TXN0000000000000622255
1523868188606090698 HeaderValidation Success TXN0000000000000622255
1523868188606122970 InvokeConverterApi Start TXN0000000000000622255
1523868188606137126 InvokeConverterApi Success TXN0000000000000622255
1523868188606158258 InvokeConverterApi END TXN0000000000000622255
1523868188606174781 ProcessMyMetricMasterData Start TXN0000000000000622255
1523868188606182963 ProcessMyMetricMasterData End TXN0000000000000622255
1523868188606191027 GenerateControlLog Start TXN0000000000000622255
1523868188606208896 GenerateControlLog End TXN0000000000000622255
1523868188606216588 SaveOperation Start TXN0000000000000622255
1523868188606288205 SaveOperation End TXN0000000000000622255
1523868188606303486 SaveOperation Success TXN0000000000000622255
select distinct(state) from GSTR4_LOG
name: GSTR4_LOG
time distinct
---- --------
0 Trigger_from
0 Start
0 Success
0 END
0 End
Want to get output of count of "Start" and Count of "Success"

Appreciate for any help

Thanks
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/7c4aa982-fe85-4b3e-af60-cd4db1c39d90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...