I am using influx DB and issuing command,
SELECT * FROM interface
Below is the out put-
interface
time element path value
2016-08-24T21:22:16.7080877Z "link-layer-address0" "key:/arp-information/link-layer-address0" "3c:61:04:48:df:91"
2016-08-24T21:22:17.9090527Z "link-layer-address0" "key:/arp-information/link-layer-address0" "3c:61:04:48:df:92"
2016-08-24T21:22:19.8584133Z "link-layer-address1" "key:/arp-information/link-layer-address1" "3c:61:04:48:df:97"
2016-08-24T21:22:20.3377847Z "link-layer-address2" "key:/arp-information/link-layer-address2" "3c:61:04:48:df:90"
When issue command it works fine.
SELECT distinct(value) FROM interface
But When issue command for path column there is no out put. Wondering what i am missing?
SELECT distinct(path) FROM interface
It determines how InfluxDB groups query results over time. For example, a time_interval of 5m groups query results into five-minute time groups across the time range specified in the WHERE clause.
MEAN(*) Returns the average field value associated with each field key in the measurement. MEAN() supports int64 and float64 field value data types.
There is SHOW TAG VALUES WITH key = path
that one can use to get unique Tag values
There is a way of solving this by using double SELECT statement:
> select distinct("tag1") from (select "field1", "tag1" from foo)
The inner query returns field1 and tag1 which can be queried outside like normal fields for which you can apply distinct().
Hope it helps. Cosmo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With