SELECT statement 2
Suppose you have the following SQL SELECT statement:
SELECT EMPLOYEE.JOBCODE, COUNT(*)
FROM EMPLOYEE
GROUP BY EMPLOYEE.JOBCODE
HAVING MAX(EMPLOYEE.AGE) > 40
To specify the statement:  
1. In the Query name field, type a name for the SELECT statement.
2. In the Description field, type a description for the SELECT statement.
3. In the Tables/views list, select EMPLOYEE.
4. In the Columns list, select EMPLOYEE.JOBCODE.
5. From the Computed columns pop-up menu, select Create.
6. In the Computed Column Details window, select COUNT(*) from the Unary operator menu; then select Apply.
7. In the Computed columns list, select COUNT(*).
8. From the Clause menu, select GROUP BY.
9. In the GROUP BY Details window, select EMPLOYEE.JOBCODE in the Columns list, and select Apply.
10. From the Clause menu, select HAVING.
Finally, in the HAVING Details window, do the following:  
1. In the Left operand field, select EMPLOYEE.AGE.
2. From the Unary operator menu, select Left operand > MAX(x).
3. In the Operator field, select >.
4. In the Right operand field, type
a. 40
5. Select Apply.
Last modified date: 08/12/2019