This visual execution trace shows how Elasticsearch bucket aggregations work. The process starts by defining the aggregation type: terms or histogram. Terms aggregation groups documents by unique values of a field, creating buckets for each unique term and counting documents in each bucket. Histogram aggregation groups numeric values into fixed-size intervals, creating buckets for ranges and counting documents per range. The execution table traces these steps with example data, showing bucket creation and document counts. The variable tracker shows how bucket contents evolve after each step. Key moments clarify common confusions about bucket uniqueness, interval definition, and why counts are used. The quiz tests understanding of bucket counts, interval steps, and effects of changing interval size. The snapshot summarizes the core ideas for quick reference.