Amazon CloudWatch Logs is excited to announce the ability for customers to use up to two stats commands in a Log Insights query. By increasing the number of stats commands to two in a single query, customers can now use the second stats command to perform aggregations on the results of the first stats operation. For example, customers can aggregate their log traffic over 10-minute intervals using a stats command, and then calculate the maximum traffic across the 10-minute intervals using another stats command in the same query.
Source:: Amazon AWS