Write a query to display the number of people with the same job
Printable View
Write a query to display the number of people with the same job
[QUOTE=pappujk;30738]Write a query to display the number of people with the same job[/QUOTE]
Here is the query
SQL> SELECT JOB,COUNT(*) NOOFEMP
2 FROM EMP
3 GROUP BY JOB;
JOB NOOFEMP
--------- ---------
ANALYST 2
CLERK 4
MANAGER 3
PRESIDENT 1
SALESMAN 4
Test for whom?
select ename from employee group by jobname;
select count(empno),job from emp group by job;