BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ilikesas
Barite | Level 11

hi,

suppose that I have the following table already sorted in this specific way:

companydatenumber
A31/11/20101
A31/11/20102
B22/1/20092
C1/1/20081

I just need the first row for each company-date combination so that the final result is:

companydatenumber
A31/11/20101
B22/1/20092
C1/1/20081

thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
ilikesas
Barite | Level 11

omg this is so simple that I just didn't think about it, I just do proc sort with nodupkey by company and date!!

View solution in original post

2 REPLIES 2
ilikesas
Barite | Level 11

omg this is so simple that I just didn't think about it, I just do proc sort with nodupkey by company and date!!

AnnaBrown
Community Manager

Thanks for coming back to post your solution, ilikesas!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to connect to databases in SAS Viya

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.

Discussion stats
  • 2 replies
  • 1317 views
  • 0 likes
  • 2 in conversation