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.

greatest(...)

greatest(...)

Returns the largest value among its arguments, ignoring NULLs.

Works with the following datatypes:

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

The greatest(...) function is used to find the largest among a collection of values. For example, find the later of the date and updated_on columns in Chicago Crimes:

https://data.cityofchicago.org/resource/6zsd-86xi.json?$select=greatest(date,updated_on)

Note that to find the largest value in a set of rows grouped by a GROUP BY clause, use max instead.