SELECT statement
To specify the example SQL SELECT statement
SELECT EMPLOYEE.JOBCODE, COUNT(*)
FROM EMPLOYEE
GROUP BY EMPLOYEE.JOBCODE
HAVING MIN(EMPLOYEE.AGE) > 40
do the following:
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. On the Computed Column Details window, do the following:
a. From the Unary operator pull-down menu, select COUNT(*).
b. Select Apply
7. In the Computed columns list, select COUNT(*).
8. From the Clause pull-down menu, select GROUP BY.
9. On the GROUP BY Details window, do the following:
a. In the Columns list, select EMPLOYEE.JOBCODE.
b. Select Apply.
10. From the Clause pull-down menu, select HAVING.
11. On the HAVING Details window, do the following:
a. In the Left operand field, select EMPLOYEE.AGE from the list.
b. From the Unary operator pull-down menu, select Left operand > MAX(x).
c. In the Operator field, select > from the list.
d. In the Right operand field, type 40.
e. Select Apply.
Last modified date: 01/29/2015