I have a dataset that has a RATE variable and a DATE variable. I want to create a table that lists each unique RATE with the most recent DATE. For example, if I had 100 records that had various counts of 1%, 2%, 3%, 4%, 5% rates, the table that I would ultimately end up would be 5 records, 1 of each for each rate, with the corresponding date that was most recent. I've been struggling with an approach to code this, so any advice that will get my in the right direction would be appreciated.
I've thought about sorting the data by the RATE column and then DATE column (descending), getting the count of all the records with each rate, and then creating datasets for each rate using the OBS function (ie if the first rate occurred 62 times, I would create a dataset starting with OBS1 and then the next dataset with LASTOBS + 1), but there must be an easier way I haven't thought of.