not in is an operation that applies to two sets. It is completely equivalent to the except operation. It removes any attributes from the first set that appear in the second. The sets are usually expressed in terms of group names. The simplest syntax is

{ names_1 } not in { names_2 }

where:

names_1 and names_2 are comma separated lists of group attribute names

For example, suppose we define the calculated value attribute VeryHighAllergens as any allergen with value in the range [50, 100):

{pollen, food, mould, mite} in range [50, 100)

Next, we define the calculated value attribute HighAllergens as any allergen with value in the range [15, 50):

{pollen, food, mould, mite} in range [15, 50)

Now we want to define calculated value attributes that give us the corresponding groups, VeryHighGroups and HighGroups. VeryHighGroups is easy to define:

VeryHighAllergens as groups from {pollen, food, mould, mite}

The definition of HighGroups is a bit more complex, as even if there is an allergen in a group with a high level, we don’t want to say that the group is high if there is some other allergen in the group with a very high level. That is, we don’t want to say that the group is in HighGroups if it is also in VeryHighGroups. To achieve this, in the definition of HighGroups we remove any groups if they are also in VeryHighGroups, as follows:

HighAllergens as groups from {pollen, food, mould, mite} not in VeryHighGroups

As an example, consider the following case. Birch and timothy are in the pollen group. Milk, peanut, cod, soya, and wheat are in the food group. Note that even though wheat and milk are high allergens, food does not appear in HighGroups as it appears in VeryHighGroups due to the very high peanut and soya values.

age            1
sex            F
milk           16.0
peanut         73.5
cod            12.1
soya           64.6
wheat          25.3
birch			15.3
timothy        17.6
VeryHighAllergens	peanut (73.5) and soya (64.6)
HighAllergens	wheat (25.3), timothy (17.6), birch (15.3) and milk (16.0)
VeryHighGroups food
HighGroups     pollen

See also:

except

as groups from

in range