Currently, I cannot do this in CnosQL:
SELECT mean(max("speed")) FROM "wind" GROUP BY time(1m)
I would like to count the average value of the maximum speed per minute over a period of time.
Currently, I cannot do this in CnosQL:
SELECT mean(max("speed")) FROM "wind" GROUP BY time(1m)
I would like to count the average value of the maximum speed per minute over a period of time.
Apparently, CnosDB supports nested subqueries with aggregate functions. You can try with
SELECT MEAN("max") FROM (SELECT MAX("speed") FROM "wind" GROUP BY time(1m) )
You use the wrong syntax of nested subqueries with aggregate functions.
The right syntax is:
SELECT_clause FROM ( SELECT_clause FROM ( SELECT_statement ) [...] ) [...]
Maybe you can try this again.
I think that it supports. However, your query seems problematic for adding "" for the measurement name. TRY:
SELECT mean(max("speed")) FROM wind GROUP BY time(1m)