08-04-2014 11:56 AM
I have a data set of items, year, and levels, similar to this. Each product has at least one entry each year, but sometimes might also have two per year. If that have two, then they also have different levels:
Using Proc SQl, I am trying to create a new data set composed of entries that for each year list all the products with their highest level. . I am working with this code below, but have not been able to get the results I want. so it would look like:
create table prod_1 as
where inventory.level = (select max(level)
.... here I tried different where clauses, but nothing is working...
Any help would be much appreciated.