Specifying a HAVING Clause

To add a HAVING clause to a query:
  1. Click the Having tab.
  2. On the Fields tab, expand the table node, and select the column to use for filtering data. The Output Columns node includes the calculated columns.
    Tip
    You can type in Filter fields to locate the column.
  3. Double-click the column or drag and drop it in the SQL expression area.
  4. (Optional) You can click the Functions tab and select the functions to use with filtering.
  5. For character variables, you can click Unique Values to load the unique values of the column. Select the check boxes to specify the unique values to include in the filter.
    Click Apply to add the unique values to the SQL expression area.
  6. Edit the HAVING clause in the SQL expression area as follows:
    Number of Values
    Edit
    Example
    A single character value
    Add an equal sign between the column name and the unique value.
    CARS.Make = 'Acura'
    More than one character value
    Specify an IN operator and enclose the unique values in parentheses.
    CARS.Make IN (
    'Acura', 'Audi')
    Numeric comparison
    Specify a numeric operator and a constant, or specify a numeric operator and another column name.
    AVG(CARS.Horsepower) >= 165
    PRDSALE.Actual > PRDSALE.Estimate
  7. Click Save to save the filter with the query.