I am trying to query multiple measurement in same query in influxdb. The result returned usually come from just one table, when I run the queries individually I get result when I run all, I get result for just one measurement eg.
Q1= from (bucket:“example)
|> range(start:30d)
|> filter(fn: (r) => r[“tag”] == “blah”)
|> filter(fn: (r) => r[”_measurement"] == “ghgh” )
|> filter(fn: (r) => r["_field"] == “gggg” )
|> aggregateWindow(every: 1s, fn: first, createEmpty: true)
|> fill(usePrevious: true)
|> yield(“first_table”)
Q2= from (bucket:“example)
|> range(start:30d)
|> filter(fn: (r) => r[“tag”] == “blah”)
|> filter(fn: (r) => r[”_measurement"] == “hjjjj” )
|> filter(fn: (r) => r["_field"] == “ffff” )
|> aggregateWindow(every: 1s, fn: first, createEmpty: true)
|> fill(usePrevious: true)
|> yield(“second_table”)
Q3= from (bucket:“example)
|> range(start:30d)
|> filter(fn: (r) => r[“tag”] == “blah”)
|> filter(fn: (r) => r[”_measurement"] == “yyyy” )
|> filter(fn: (r) => r["_field"] == “fdfdfd” )
|> aggregateWindow(every: 1s, fn: first, createEmpty: true)
|> fill(usePrevious: true)
|> yield(“third_table”)
running this type of query returns just one of the query, however running them separately yields result for the three queries, join doesnot work either