2 Replies Latest reply: Feb 26, 2016 9:12 AM by Georg Gottsmann RSS

    How to get the minimum or maximum value for every distinct row reading from multiple files?

    Georg Gottsmann

      Dear all,

       

      let's say I have three txt-files like this:

       

      List1:

      ID    Value

      1     100

      2     200

      3     300

       

      List2:

      ID    Value

      1     80

      2     250

       

      List3:

      ID     Value

      1     75

      2     150

      1     12

       

      How can I read those files sequentially and store the minimum or maximum value over all records for every distinct ID? No matter in which order I read the lists, the result should be:

       

      ID    Value

      1     12

      2     150

      3     300

       

      Thank you in advance.