Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

min()

Returns the minimum value of a dimension or measure field.

Example - Find the Smallest Opportunity For Each Account

1q = load "Ops";
2q = group q by 'Account_Name';
3q = foreach q generate 'Company' as 'Company', min('Amount') as 'Smallest Deal';

Example - Find the First Value in List of Airline Destinations per Origin

For dimensions, min() sorts the values alphabetically and the first value is returned.

1q = load "Airlines";
2q = group q by 'origin';
3q = foreach q generate 'origin' as 'Origin', min('dest') as 'Min Destination';