You can't really do that (easily) in SQL.
PROC SORT with NODUPKEY.
Be aware if you have different values on different rows for the id column, which ones you want in the output data set.
If they are all the same, you hava duplicate rows, and then you could use DISTINCT in SQL.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.