Skip to main content
Hi All,

 

 

I have a table contains 3 fields like (id, value1, value2). In that table I have some duplicate records with combination of  fields (id & value1) and the field value3 contains numeric values, these may differ or same. I have requirement like  to find the largest value record from the duplicate records of combination of  fields (id & value1).

 

 

Can any one please suggest the approach that how to find the largest value record.

 

 

Thanks,

 

Seshu
Sorter, to get your data into an appropriate order.

 

DuplicateRemover, to filter out the duplicate records, if this is necessary.

 

StatisticsCalculator, to get the 'Maximum Attribute'.

 

 

Depending on how you do this you may want to Aggregate features on an ID and put the values into a list (an option in the Aggregator). In this case to get the maximum you'll want the ListSorter if you are grabbing certain records or just the ListRangeExtractor will do it too...

Just came across this now but maybe useful for others - I had a similar issue but involved additionally comparing geometry and then picking the maximum attribute from the matching features.

So the process was:

  1. Matcher (on geometry only and create 'match_id' attribute to indicate matches)
  2. Statistics calculator (only selecting sum on the attribute I want the max for)
  3. Sorter (by Descending to make the first feature the one I want, and group by match_id)
  4. Sampler (first Nth feature, N being 1 and group by match_id) gets only the max valued feature leaving the rest behind

Steps 2, 3 and 4 are relevant for the question posted.


Reply