Skip to content
Advertisement

SAS datastep/SQL select latest record from multiple records with same ID

For example I have a dataset as below:

By datastep or sql, how could I get the record with id = 1 and latest Date 2002/01/01? Help is appreciated and thanks in advance.

Advertisement

Answer

Try this sql.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement