The use case is to be able to use the result of a query in part of another query.
The classic example of this is the top N use case:
// Gather the top 10 hosts by mem used_percent over the last day.
hosts = from(bucket:"telegraf/autogen")
|> range(start: -1d)
|> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent")
|> max()
|> group()
|> top(n: 10)
|> columnSlice(column: "host")
// Select the last 30d of cpu usage for only the top 10 hosts
from(bucket:"telegraf/autogen")
|> range(start: -30d)
|> filter(fn: (r) => r._measurement == "cpu" and r.host in hosts)
This depends on #1085
The use case is to be able to use the result of a query in part of another query.
The classic example of this is the top N use case:
This depends on #1085