where salary between 70000 and 80000
proc sql; select jobcode, avg(salary) as AvgSalary format=dollar11.2 from sasuser.payrollmaster group by jobcode having avg(salary) > (select avg(salary) from sasuser.payrollmaster);
Type of Subquery
|
Description
|
---|---|
noncorrelated
|
a self-contained subquery
that executes independently of the outer query
|
correlated
|
a dependent subquery
that requires one or more values to be passed to it by the outer query
before the subquery can return a value to the outer query
|