cancel
Showing results for 
Search instead for 
Did you mean: 

Picking up a row based on max value

ryagnik
New Contributor

I have a usecase in which I get the files from some software that has record as follows -

Item Account Paid …
1 2.05
1 1.00
1 3.05
2 4.00
3 5.00

Now, I want to select the records having max value from account paid.It is like data base query pick max( account paid) group by item in RDBMS world.

I was able to group records but is there a way where I can select max( account paid ) value using snap ?

Any help much appreciated here…

Thanks…

4 REPLIES 4

ryagnik
New Contributor

My output should look something like this -

1 3.05
2 4.00
3 5.00

By using Aggregate Snap you can achieve your scenario. Please find below screen shot for reference.

image

Also I have attaching the sample snaplogic pipeline. please check it. Hope this is useful for you!
SL_COMM_SC1_2018_03_19.slp (3.2 KB)

So this works for simple example but aggregate fails when there are more fields.

Fails in what way?


Diane Miller