Sorting three columns in table

Hello everyone:)

Trying to find a way to do the following without success:

I want to sort a table and get a column from the last record after sorting it.
After sorting I want the below results so that I can find the LAST code per group per level
in order to generate the next code for the next record entry. How do I do this??

Thank you!

Group…Level…Code

DRW …1… DRW1_1
DRW …1… DRW1_2
DRW …1… DRW1_3
DRW …2… DRW2_1
DRW …2… DRW2_2
DRW …3… DRW3_1

PNT…1…PNT1_1
PNY…

To start with, where do those values come from? If they come from a database query, it is different than them coming from a flat file.

Sponsor our Newsletter | Privacy Policy | Terms of Service