Use Case - KPI Generation

Use Case: Transaction CDRs are indexed to Elastic Search for every transaction.

Now If I want to query this CDR data and generate statistics such as Total Transactions Per Hour, Per Transaction Type, Per Status wise...etc and store these statistics summary into a new Index of ES.

Can anyone give me a approach.

Thanks