Perform the following steps to add a HAVING clause
to the SQL query in the Diagram
tab in the Designer
in the Navigate pane to access the Diagram
tab and the SQL Clauses pane.
in the SQL Clauses pane. The Having
object is added to the query flow on the Diagram
in the Navigate pane to access the Having
on the Having
tab to begin
the first condition of the expression. An editable row appears in
the table near the top of the tab.
the appropriate operands and operator for the first condition.
remaining conditions for the HAVING clause. You need to add one row
for each condition.
that is created for the sample query is depicted in the SQL code generated
in this step in the SQL
field, as shown in
the following display.
Sample SQL Query Subsetted with a HAVING Clause
the SQL code for the HAVING clause that is shown in the SQL
field is identical to the highlighted HAVING clause
code that is displayed on the Code
highlight the code for a query object, right-click the object in the
Navigate pane and click Find In
. Then, click Code
in the submenu.) The HAVING clause subsets the
groups that are included in the results for the query. In the sample,
only the regions with an average population density of less than 100
are included in the query results.