How to join the same field from multiple series from same measurement

#1

I use a InfluxDB with Influxql. Now I want to join the same fields, e.g. “country”, from five series, which are all in one and only measurement. Any idea how I can handle this? Thanks!

0 Likes

#2

To select two fields simultaneously would look something like this:
SELECT "usage_user", "usage_system" FROM "telegraf"."autogen"."cpu" WHERE time > -1m AND "cpu"='cpu-total' FILL(null)

or for your example

SELECT "spain", "greece" FROM "telegraf"."autogen"."country_measurement" WHERE time > -1m AND "country_tag_key"='country_tag_value'

What do you want to do with the join?

0 Likes

#3

I want to join two Numbers, add them and send the result to a Grafana Endpoint. At the moment grafana take the two values as seperated values and not the result from both of them

0 Likes