WHERE, HAVING, and QUALIFY Clause Usage
The WHERE clause specifies a conditional expression by which rows for the view are to be selected.
The HAVING clause specifies a conditional expression by which the groups defined by a GROUP BY clause are to be selected.
The QUALIFY clause specifies a conditional expression used to filter the results of a previously computed ordered analytical function according to user‑specified conditions.
You cannot specify a SAMPLE clause within a subquery predicate within a WHERE, HAVING, or QUALIFY clause.
Joins can only be defined in the HAVING clause of a view when that HAVING clause is part of a subquery.
Do not use
SELECT * in a subquery if any underlying table or view might be modified.
Names are resolved and columns are defined when the view is defined; therefore, changes
to the table are not incorporated into the view definition if the
SELECT * construct is used.