max(...)

max(...)

Returns the maximum of a given set of numbers

Works with the following datatypes:

This function works with 2.1 endpoint(s). What does this mean? »

The max(...) function is most commonly used in $select aggregations to return the maximum of a set of numeric values (Numbers, Doubles, or Moneys). For example, to fetch the highest salary of all of the employees in the City of Chicago:

https://data.cityofchicago.org/resource/tt4n-kn4t.json?$select=max(annual_salary)

It can also be used in $group aggregations, like this one to get the maximum salary by job type:

https://data.cityofchicago.org/resource/tt4n-kn4t.json?$select=job_titles,max(employee_annual_salary)&$group=job_titles