September 2019
Beginner to intermediate
346 pages
7h 35m
English
The simplest way to subset a dataset is by using the Where statement in Proc SQL. The general syntax of such a query is:
Proc SQL; Select * From Where ;Quit;
You can also subset using the drop and keep option. This is a good way to restrict the variables that are needed in the output dataset. Remember that subsetting is crucial in Proc SQL as the default is the Cartesian product. Any amount of filtering that can be done will reduce the number of rows processed and thereby make the querying process faster.
Other options include first applying the where condition which would reduce the largest number of records from the output dataset. In a large dataset, the order of the where condition can lead to a significant saving in processing ...
Read now
Unlock full access