3 Replies Latest reply on Dec 2, 2016 10:16 AM by Abdul Subhan Mohammed

    Selecting the Max revision number

    Abdul Subhan Mohammed

      Hello Guys,

       

      I am stuck at this situation here where I have a project name, which has multiple updates, each update is signified by the revision number.

       

      I wanted to use the data from revision with the highest number. for example.

       

      System_id   Revision Number System State

      100                          1                 New

      100                          2                 New

      100                          3                 Active

      101                          1                 New

      101                          2                 Active

      101                          3                 Closed

       

      I want the result to be :

       

      System_id   Revision Number System State

      100                          3                 Active

      101                          3                 Closed

       

      This is possible if I use max(system_rev) but it shows me highest rev of each state.which is not what I want.

       

      100                          2                 New

                                      3                 Active

      101                          2                 Active

                                      3                 Closed

       

      Any help would be highly helpful.

       

      Thank you for your time.