Using SQL Procedure Tables in SAS Software

Because PROC SQL tables are SAS data files, you can use them as input to a DATA step or to other SAS procedures. For example, the following PROC MEANS step calculates the mean for Area for all countries in COUNTRIES:
proc means data=sql.countries mean maxdec=2;
   title "Mean Area for All Countries";
   var area;
run;
Using a PROC SQL Table in PROC MEANS
Mean Area for All Countries