8.
3.
4. 5.
Display the department number and number of clerks in each department. SELECT deptno, count(job) FROM emp WHERE job = ’CLERK’ GROUP BY deptno; Display the department number and total salary of employees in each department that employs four or more people. SELECT deptno, sum(sal) FROM emp GROUP BY deptno HAVING count(empno) >= 4; Display the employee number of each employee who manages other employees with the number of people he or she manages. SELECT mgr, count(mgr) FROM emp WHERE mgr IS NOT NULL GROUP BY mgr;
6.
(C) Join SELECT Command Questions 1. 2. 3. Display the name of each employee with his department name. SELECT ename, dname FROM emp INNER JOIN dept ON emp.deptno = dept.deptno; Display a list of all departments with the employees in each department. SELECT