SQL-statement to find lowest observation in dataset

The SAS SQL-statement below will create a dataset containing all information for the observation with the lowest age in the dataset SASHELP.CLASS.

The syntax for the SAS SQL-statement is showed below.

As you see the <FUNCTION> doesn’t have to be min (minimum), it can be any function working on the type of <COLUMN TO SEARCH> – numeric or char.

Leave a Reply

Your email address will not be published. Required fields are marked *