Socrata was acquired by Tyler Technologies in 2018 and is now the Data and Insights division of Tyler. The platform is still powered by the same software formerly known as Socrata but you will see references to Data & Insights going forward.

The $group Parameter

SoQL also provides a limited amount of aggregation functionality through its $group parameter. $group must be used in conjunction with $select to provide the aggregation functions you wish to use. For example, to find the strongest earthquake by region, we want to $group by region and provide a $select of region, MAX(magnitude):$select=region,MAX(magnitude)&$group=region

The currently supported grouping expressions are:

Function Datatypes Supported Description
sum Number Sums up all the values in a grouping
count All Counts the number of values. null values are not counted
avg Number Finds the average value of numbers in this column
min Number Finds the minimum value of numbers in this column
max Number Finds the maximum value of numbers in this column