GraphQL

Aggregations

you can use the grouptransactions and groupaccountstates endpoints to perform aggregation operations these endpoints support various aggregation functions and allow for grouping, sorting, and filtering of results example explanation of parameters by list of strings fields by which to group the results you can use all fields of block, transactions and account states check out raw transactions for all available fields in result for some fields, you can apply functions for example, you want to group by month, you can use by \["gen utime toyyyymm"] currently, allowed functions \['toyyyymmdd', 'toyyyymm', 'toyear'] aggregations list of aggregation objects specifies the fields to aggregate and the operations to perform each object includes field the field to aggregate on (optional for count ) operation the aggregation operation (e g , sum , count ) order by string the field to sort the results by can be a simple field name or an aggregation field in the format field operation order desc boolean specifies the sorting order true for descending order, false for ascending order page int the page number for pagination (default is 0) page size int the number of results per page (default is 50) filter by filtering expression a set of conditions to filter the data available aggregation operators count counts the number of items sum sums the values of a field min finds the minimum value of a field max finds the maximum value of a field avg calculates the average value of a field argmax finds the value of another field corresponding to the maximum value of the target field comment argmin finds the value of another field corresponding to the minimum value of the target field comment least finds the least value among the specified fields quantile calculates the quantile value of a field notes aggregation operations can be computationally expensive; consider limiting the scope using filter by and pagination parameters ( page and page size )