Max(count) field

Need to get max count of specific field in last 30 minutes.
What is appropriate query for this?


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.
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: 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?