The WHERE and HAVING clauses both subset data based
on an expression. In the query examples shown earlier in this chapter,
the WHERE and HAVING clauses contained standard SAS expressions. For
example, the expression in the following WHERE clause uses the BETWEEN-AND
conditional operator and specifies the Salary column as an operand:
where salary between 70000 and 80000
PROC SQL also offers
another type of expression that can be used for subsetting in WHERE
and HAVING clauses: a query expression or subquery. A subquery is
a query that is nested in, and is part of, another query. A PROC SQL
query might contain subqueries at one or more levels.
Note: Subqueries are also known as nested ...