Hi
Need to get max count of specific field in last 30 minutes.
What is appropriate query for this?
Thanks
Hi
Need to get max count of specific field in last 30 minutes.
What is appropriate query for this?
Thanks
Are you using Flux or InfluxQL?
@grant1 Flux.
FYI: I group by myfield each 1s and it has specific value in each second,now need to find maximum value of last 30 min that group by each 1s.
example:
00:01:00 50
00:01:01 100
00:01:02 2
00:01:03 101
00:01:04 90
00:01:05 56
expected output: 101
here is what i try:
http://192.168.1.1:8086/query?pretty=true&q=SELECT+MAX(count)+FROM+(SELECT+count(myfield)+AS+count+FROM+mymeasure) WHERE time > now() - 30m GROUP BY time(1s) &db=mydb
You stated that you are using Flux, but the query that you showed is InfluxQL. Can you please clarify which language you are using?