Subsetting Data By Using Noncorrelated Subqueries
A noncorrelated subquery is a self-contained subquery
that executes independently of the outer query.
Using Single-Value Noncorrelated Subqueries
The simplest type of subquery is a noncorrelated subquery
that returns a single value.
The following PROC SQL
query is the same query that is used in the previous section. This
query displays job codes for which the group's average salary
exceeds the company's average salary. The HAVING clause contains
a noncorrelated subquery.
avg(salary) as AvgSalary
group by jobcode
having avg(salary) >
PROC SQL always evaluates a noncorrelated ...