I 6 hour try convert influxQL to FLUX query. Any can do it ?
CREATE CONTINUOUS QUERY trade_to_candles_60 ON mydb
RESAMPLE EVERY 10s FOR 10m
BEGIN SELECT first(price) AS open, last(price) AS close, max(price) AS high, min(price) AS low, sum(amount) AS volume INTO
candles_1m FROM trades WHERE
GROUP BY time(1m), pair, exchange END
@shclonk You’re going to need to create a Flux task. If you create the task through the InfluxDB UI, leave out the options statement. The UI autogenerates that using the specified task settings. If you’re add the task through the API or the CLI, leave the options statement in.
The Flux team has plans to make the syntax for these mutli-aggregate queries a little simpler. This is only one approach. Here’s another way you could do it:
Hi. Well, it’s been two years. In that time we have become a major exchange, and you have released version 3 where they say completely redesigned SQL native syntax.
So after 2 years the question, how will my request look like on v3?