Max_index - ObjectVision/GeoDMS GitHub Wiki
Aggregation functions max_index
- max_index(a)
- max_index(a, relation)
- max_index(a) results in a parameter with the index numbers of the maximum value of the non null values of attribute a.
- max_index(a, relation) results in an attribute with the index numbers of the maximum 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.
The max_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<Cit> max_index_NrInh := max_index(City/NrInhabitants); result = 0
attribute<City> max_index_NrInhRegion (Region) := max_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
max_index_NrInhRegion |
---|
0 |
1 |
2 |
4 |
null |
domain Region, nr of rows = 5