hi,
suppose that I have the following table already sorted in this specific way:
company | date | number |
---|---|---|
A | 31/11/2010 | 1 |
A | 31/11/2010 | 2 |
B | 22/1/2009 | 2 |
C | 1/1/2008 | 1 |
I just need the first row for each company-date combination so that the final result is:
company | date | number |
---|---|---|
A | 31/11/2010 | 1 |
B | 22/1/2009 | 2 |
C | 1/1/2008 | 1 |
thank you!
omg this is so simple that I just didn't think about it, I just do proc sort with nodupkey by company and date!!
omg this is so simple that I just didn't think about it, I just do proc sort with nodupkey by company and date!!
Thanks for coming back to post your solution, ilikesas!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.