A Splunk power user is creating a report that requires calculating the running total of sales amounts over time, and also needs to include the overall average sales amount for each region on every row. Which two commands can be used together to achieve this? (Choose two.)
The 'eventstats' command computes aggregations across all events and adds the results to each event as a new field. Here, 'eventstats avg(sales_amount) as region_avg by region' would add the average sales amount per region to every row, satisfying the requirement to include the overall average on each row. It does not collapse events, so it works well alongside 'streamstats' for the running total.
Why this answer
To calculate a running total of sales amounts, 'streamstats' is the appropriate command because it processes events sequentially and can compute cumulative sums. To include the overall average sales amount per region on every row, 'eventstats' is needed because it calculates aggregations across all events and appends the result to each event without collapsing them. Used together, they provide both the running total and the per-region average on each row, meeting the report's requirements.
Exam trap
The trap here is confusing 'eventstats' with 'stats'; 'eventstats' preserves individual events and adds aggregate fields, while 'stats' collapses events, making it impossible to show both individual rows and aggregates simultaneously.