Min() returns the lowest numeric value of the aggregated data in the expression, as defined by a group by clause. By specifying a rank n, the nth lowest value can be found.
Return data type: numeric
|expr||The expression or field containing the data to be measured.|
The default value of rank is 1, which corresponds to the lowest value. By specifying rank as 2, the second lowest value is returned. If rank is 3, the third lowest value is returned, and so on.
Examples and results:
Add the example script to your document and run it. Then add, at least, the fields listed in the results column to a sheet in our document to see the result.
LOAD * inline [
] (delimiter is '|');
LOAD Customer, Min(UnitSales) as MyMin Resident Temp Group By Customer;
|Result field (Customer)||Result value (MyMin)|
Given that the Temp table is loaded as in the previous example:
LOAD Customer, Min(UnitSales,2) as MyMinRank2 Resident Temp Group By Customer;
|Result field (Customer)||Result value (MyMinRank2)|