logo-header

 
 

 syntax

definition

  1. max_index(a) results in a parameter with the index number of the maximum value of the non null values of attribute a.
  2. 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 the relation attribute. The domain unit of the resulting attribute is the values unit of the relation attribute.

description

The max_index function is not defined for string data items.

applies to

Attribute with Numeric, Point or boolean value type.
Relation attribute with value type of the group CanBeDomainUnit

conditions

The values unit of the resulting data item should be the domain unit of argument a.

since version

7.184

example

parameter<City> 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

see also


OBJECT VISION BV
Vrije Universiteit
De Boelelaan 1085
1081 HV Amsterdam
The Netherlands

tel: +31 (0)20 598 9083
fax:+31 (0)20 598 9904