Min (open)
Aggregate function which returns the lowest value.
Syntax
// Core function, no LOADLIB necessary
VARIANT FUNCTION Min(VARIANT data)
Parameters
VARIANT data
Array of expressions
Return value
VARIANT
Returns the expression with the lowest value
Description
Min is an aggregate function which can be used in SELECT statements, and which returns the expression with the lowest value in a group. Min can only be used within a SELECT statement, and specifically only in the HAVING, ORDER BY clauses and in the list of selected cells.
Examples
// Show per car maker which model is the cheapest
SELECT maker, Min(price)
FROM car_types
GROUP BY maker