_ SELECT Deptid, COUNT( =
2 FROM employee *) “a of Empr
3. GROUP BY Deptidle: we use a condition in the ¥
the WHERE clause can be used to
groups, as you see in Figure 6-26. In this fi
have four or more rooms) The error OR
allowed in the WHERE clause. We
clause, which is used for restricting gy
\VING
clause
GROUP BY cla
ned the HAVING clFigure 6-28 GROUP BY sort order changed
Let us look at another example of GROUP BY and
Ployces who have more than two dependents, We will
and GROUP BY Employeeld column, find COUNT «
check for COUNT higher than 2: