Compute the stats and sum_of_squares, variance, std_deviation, and std_deviation_bounds (±2 std_deviation from the mean) of the numeric field value of the records in one shot. This example aims to find the extend_stats value of the open price of the ACWF ETF in the cf_etf_hist_price index:
"query": { "match": { "symbol": "ACWF"}},"aggs": {"extended_stats_open_price": {"extended_stats": {"field": "open"}}}