Week7 - Complex SQL Queries
Week7 - Complex SQL Queries
INCORRECT QUERY:
SELECT Dno, COUNT (*)
FROM EMPLOYEE
WHERE Salary>40000
GROUP BY Dno
HAVING COUNT (*) > 5;
Combining the WHERE and the
HAVING Clause (continued)
Correct Specification of the Query:
Note: the WHERE clause applies tuple by tuple