4 Replies Latest reply: Jul 23, 2014 9:25 AM by gurjeet singh RSS

    get respective record of max value - using group by

      i have two tables

      table1:

      load * inline

      [srno, id , status

      101,1,Accepted

      102,1,Verified

      103,1,Rejected

      104,2,Accepted

      105,2,Verified

      106,3,Accepted

      107,4,Accepted

      108,4,Verified];

       

       

       

      table2:

      load * inline

      [id, product , quantity

      1,A,10

      2,B,20

      3,C,30

      4,D,40

      ];


      expected result

      id,     status     product      quantity

      1       Accepted     A          10

      2     Verified     B          20

      3     Accepted     C          30

      4     Verified     D          40

      (result can be viewable in table chart)

      means i need respective status according to the max(srno) and group by id


      How can i approach the above scenario either by UI or by script