Partial sorting SAS can also do the partial sorting like Excel does. Since SAS deals with observation as basic unit, subsetting and merging is necessary before a partial soring by Proc one; input @1 var1 1. @3 var2 $1. @5 var3 $1. @7 var4 1. @9 var5 $1.; cards;1 Y A 7 Z3 J A 6 T2 E A 5 S7 Z A 4 Q4 Q B 3 J6 T B 2 E5 S B 1 Y;run;proc sort data=one out=one_s(drop=var4 var5); by descending var1;run;data two; set one_s; set one(keep=var4 var5);run;
How to tune a SQL query From: Russ Lavery. The SQL Optimizer Project: _Method and _Tree in SAS®9.1. SUGI 30