Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: ryehStony just brought to my attention that you probably care more about the FileName with the largest RdCnt. To do that, we could sort first by RdCnt, and the pull off the last item. So something like:
node:Sort
bretype:core::Sort
editor:sortkey=5543985308f80ffc
input:@40fd2c743ebf4304/=Static_Data.40fe6c55598828e5
output:@40fd2c746a2a3b47/=
prop:CompareOrderExpr=<<EOX
RdCnt
EOX
editor:XY=150,380
end:Sort
node:Get_Last
bretype:core::Tail
editor:Label=Get Last
editor:sortkey=5543987832553f8d
input:@40fd2c741aa333c7/=Sort.40fd2c746a2a3b47
output:@40fd2c747c310361/=
prop:RecordCount=1
editor:XY=260,380
end:Get_Last
node:Static_Data
bretype:core::Static Data
editor:sortkey=5543954e7039755a
output:@40fe6c55598828e5/=
prop:StaticData=<<EOX
FileName,RdCnt:int
FileA, 200
FileB, 180
FileC, 150
EOX
editor:XY=50,380
end:Static_Data
Addendum: For large data sets where performance is important, sort in reverse and then use the Head node instead. To sort in reverse, i.e. largest number first, use reverse(RdCnt) in the Sort node. (Another Stony trick!)