highest value of finds the maximum value within a set of attribute values. The simplest syntax is
highest value of { names } in range [lower, upper]
where:
names are comma separated lists of attribute names or group attribute
nameslower and upper are numeric constants.
Another possible syntax is
highest value of calculation
where:
calculation is a calculated value attribute defining a set of
attributes using the in range function.
A typical use of this function is to compare the highest value from two sets of attribute values. For example, suppose we have a calculated value attribute HighFood defined as:
{milk, cod, peanut} in range [15.0, 50)
and a calculated value attribute HighPollen defined as:
{birch, timothy} in range [15.0, 50)
and a case as follows:
age 6 sex F milk 0.0 peanut 43.5 cod 32.1 birch 24.6 timothy 25.3 HighFood peanut (43.5) and cod (32.1) HighPollen timothy (25.3) and birch (24.6)
Then the following conditions are all true for this case:
highest value of HighFood is 43.5
highest value of HighPollen is 25.3
highest value of HighFood > highest value of HighPollen
Another typical use is in finding the highest value in a case of the attributes in a group. For example, suppose that we have
LowGroups = (LowAllergens as groups from {food, pollen}) not in ((ModerateGroups union HighGroups) union VeryHighGroups)
then
highest value of LowGroups
Will evaluate for a case as follows. First, LowGroups is evaluated, to give a set of group attributes. For each of these group attributes, the highest value in the case of the attributes in the group is found. The highest of these ‘group maximum’ values is returned.
See also: lowest value of