MINIMUM
Returns the minimum value of the field on the child table for each parent record. The optional filter query argument can be used to restrict the records included in the calculation.
MINIMUM works in date order for dates (giving earliest date), numeric order for numbers (smallest number) and alphabetical for text (earliest letter). MAXIMUM works the other way around.
MINIMUM ( <field_name> [, Index [, <filter_query>] ] )
-
field_name: The field to return the value from.
-
index: Specifies the index value to be used. An index of 1 indicates the lowest (minimum) value; an index of 2 indicates the second lowest value, and so on.
-
filter_query: A query string representing the domain of records to include.
Example: create a field on the CUSTOMER table to return the 2nd lowest value of products of type B that each customer purchased.
MINIMUM([PRODUCT.PRODUCT_VALUE],2, [PRODUCT.PRODUCT_CODE]= "B")