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!
Join us for SAS Community Trivia
SAS Bowl XXIX, The SAS Hackathon
Wednesday, March 8, 2023, at 10 AM ET | #SASBowl
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.