Skip to main content
Solved

Finding highest value record

  • January 29, 2013
  • 2 replies
  • 1281 views

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

Best answer by davideagle

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...
View original
Did this help you find an answer to your question?

2 replies

davideagle
Contributor
Forum|alt.badge.img+19
  • Contributor
  • Best Answer
  • January 29, 2013
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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings