Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: timonkChris,
Good Day.
A good way of finding the min/max of a particular field is to use the Aggregate node. You would set it up to aggregate on every record, and use the "max" or "min" BRAINscript functions as you went to determine the value you want.
For example, in an Agg you could have something similar to the following:
(I want the maximum value for the ID field)
if firstInGroup then best = 0
else
best = max(best,'ID')
emit best as BEST
where lastInGroup
(my groupby statement is 1, to use every record)
Or flip it with the MIN function.
Does this help?
Regards
Timon Koufopoulos
MDA Support.