I have a table say Variables, in which a column exists with name "name". The field has values like-

```
    abc_R01
    abc_R02
    abc_R03
    pqrs_R01
    pqrs_R02
    xyz_R01
    xyz_R02
    xyz_R03
    xyz_R04

```

Now my selection criteria is like that I have to select latest variable names of each, i.e. can I fire a single/complex query to obtain result like-

```
    abc_R03
    pqrs_R02
    xyz_R04

```

Or I need to process it via my code, Here \_Rxx denotes revision of my variables.
Please help me.