I have this cumulative sum query, which adds the number of entrances and exits in a building every 15 minutes:
Which uses this query for the count:
rangesum( above( sum(forward_count2-backward_count2),0,rowno(TOTAL)))
How can I modify this query to return the highest value of this cumulative sum for each day? I would like to use the highest value as a measure in a bar chart.