R2 SQL, Cloudflare's serverless analytics query engine, now supports aggregations, enhancing its capabilities for processing large datasets stored in the R2 Data Catalog. Aggregations, commonly known as "GROUP BY queries", offer a concise summary of data, enabling users to generate reports, identify trends, and detect anomalies efficiently. The integration of aggregation functions builds upon existing filter queries and introduces advanced execution strategies, such as scatter-gather and shuffling, to optimize the processing of vast data volumes across Cloudflare's distributed network. Scatter-gather allows for efficient computation by distributing tasks across worker nodes, which compute intermediary pre-aggregates that are then merged for final results. However, for more complex queries requiring sorting or filtering, a shuffling stage is implemented, where data is redistributed among workers to ensure accurate aggregation across distributed data. This distributed approach reduces the computational burden on a single node by leveraging Cloudflare's comprehensive compute resources, facilitating scalable operations without necessitating external OLAP infrastructure management. As a result, users can perform comprehensive data analysis and reporting within Cloudflare's platform, taking full advantage of its global network and compute capabilities.