Min_index - ObjectVision/GeoDMS GitHub Wiki
Aggregation functions min_index
- min_index(a)
- min_index(a, relation)
- min_index(a) results in a parameter with the index number of the minimum value of the non null values of attribute a.
- min_index(a, relation) results in an attribute with the index numbers of the minimum values of the non null values of attribute a, grouped by relation. The domain unit of the resulting attribute is the values unit of the relation attribute.
The min_index function is not defined for string data items.
- attribute a with Numeric, Point or boolean value type
- relation with value type of the group CanBeDomainUnit
The values unit of the resulting data item should be the domain unit of argument a.
7.184
parameter<City> min_index_NrInh := min_index(City/NrInhabitants); result = 5
attribute<City> min_index_NrInhRegion (Region) := min_index(City/NrInhabitants, City/Region_rel);
City/NrInhabitants | City/Region_rel |
---|---|
550 | 0 |
525 | 1 |
300 | 2 |
500 | 1 |
200 | 3 |
175 | null |
null | 3 |
domain City, nr of rows = 7
min_index_NrInhRegion |
---|
0 |
3 |
2 |
4 |
null |
domain Region, nr of rows = 5