Influxdb merge syntax

1.1k views Asked by At

What's the right syntax to merge 3 or more series on influxdb?

Query below works fine for 2 series:

select mean(value) from "serieA" 
merge "serieB" 
where time > now ()-3m group by time(60s)

Tried:

merge "serieB" "serieC"
merge ("serieB","serieC")
merge "serieB","serieC"
merge "serieB" and "serieC"

EDIT: Figured that out:

select mean(value) from merge (serieA,serieB,serieC) ...

Thanks!

1

There are 1 answers

0
Suonto On

You can also use wildcards like this, with InfluxDB <= 0.8:

select mean(value) from merge(/my.series.*/) group by time(1d);

NOTE: The syntax has been deprecated since InfluxDB 0.9. See the InfluxDB documentation. In InfluxDB 0.9 neither the MERGE nor JOIN operations are supported.