SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

selecting first obs of a combination

Accepted Solution Solved
Reply
Super Contributor
Posts: 441
Accepted Solution

selecting first obs of a combination

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!


Accepted Solutions
Solution
‎06-09-2015 08:16 PM
Super Contributor
Posts: 441

Re: selecting first obs of a combination

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


All Replies
Solution
‎06-09-2015 08:16 PM
Super Contributor
Posts: 441

Re: selecting first obs of a combination

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

Community Manager
Posts: 564

Re: selecting first obs of a combination

Thanks for coming back to post your solution, ilikesas!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

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