Query - Derivative on selector function executed on the result of nested query

query

#1

Hi Team,

Business wise requirement is: We collect counter per minute from multiple containers. What is expected is request per second over a period of 5 minutes.

Here is the query I am trying to execute:
select non_negative_derivative (last(“summed_counter”)) from (select sum(“counter”) AS “summed_counter” from poc9 group by time(1m)) group by time(5m);

Explanation:

The inner query gets me the sum of all the counter of all the containers per minute.

select last(“summed_counter”) from (select sum(“counter”) AS “summed_counter” from poc9 group by time(1m)) group by time(5m); -> This gives me the total number of request in last minute of the 5 minutes bucket.

Now when I try to do a non_negative_derivate(last(“summed_counter”), 1s) - This one doesnt work. Is it something like I can’t do a transformation function on result of nested queries?

Any help is appreciated.

Thanks
Piyush