minimum
- Details
- Last Updated on Wednesday, 16 January 2013 09:07
syntax
- min(a)
- min(a, partioning)
definition
- min(a) results in a parameter with the minimum of the non null values of attribute a.
- min(a, partioning) results in an attribute with the minimum of the non null values of attribute a, grouped by the partioning attribute.The domain unit of the resulting attribute is the values unit of the partioning attribute.
The values unit of the resulting data item should match with regard to value type and metric with the values unit of attribute a.
description
The min function is not defined for boolean data items, use the any function instead.
applies to
Attribute a with value types:
- groups: Numeric, Point
- string
conditions
Attributes a and partioning need to match with regard to their domain unit.since version
5.15
example
1. parameter<uint32> minNrInh:
expr = "min(City/NrInhabitants)"; result = 175
2. parameter<string> minCityName:
expr = "min(City/CityName)"; result = ‘Amsterdam’
3. attribute<uint32> minNrInhRegion (RegionDomain):
expr = "min(City/NrInhabitants,City/RegionNr)";
4. attribute<string> minCityNameRegion (RegionDomain):
expr = "min(City/CityName,City/RegionNr)";
| City/NrInhabitants | City/CityName | City/RegionNr |
| 550 | Amsterdam | 0 |
| 525 | Rotterdam | 1 |
| 300 | Utrecht | 2 |
| 500 | DenHaag | 1 |
| 200 | Eindhoven | 3 |
| 175 | Haarlem | null |
| null | null | 3 |
| minNrInhRegion | minCityNameRegion |
| 550 | Amsterdam |
| 500 | DenHaag |
| 300 | Utrecht |
| 200 | Eindhoven |
| null | ÿÿÿÿ1 |
1) ÿÿÿÿ represents the max value for strings