I'm not sure I'm asking this correctly which is probably why I can't find the solution. So I'll provide an example.
Suppose I have a log of employees hired by managers in a given time period. I can create a query that groups by manager and shows the number of employees hired
stats count() as numEmployees by managerId
| filter @message like /hired employee/
| sort numEmployees desc
Let's suppose that generates the following table
Mngr | numHires
Jack | 4
Judy | 3
May | 3
John | 2
Jake | 2
Mary | 1
Sam | 1
Alan | 1
I'd like to further refine my result so that I can produce another histogram of numHires and count like so
4 | 1
3 | 2
2 | 2
1 | 3
This table means there was 1 instance of 4 hires, 2 instances of 3 hires, 2 instances of 2 hires, and 3 instances of 1 hire.
Is there a way to do this?
ps - I know I can download the csv and do this in excel. However, there is a limit
of 10000 results returned in cloudwatch