Multiple choice

Consider the following database table

Table Name- Em ||||| |---|---|---|---| |Deptno|job|department|city| |001|Manager|Sales|Kolkata| |002|Coordinator|Ministry|Delhi| |003|Clerk|HR|Delhi| |004|Clerk|Industry|Mumbai| |005|Developer|Technical dept|Banglore|

Find the number of Clerk’s working for each department.

  1. SELECT DEPTNO, JOB FROM EMP GROUP BY DEPTNO

  2. SELECT DEPTNO FROM EMP WHERE JOB=’CLERK’ GROUP BY DEPTNO

  3. SELECT DEPTNO, COUNT(*) FROM EMP WHERE JOB=’CLERK’ GROUP BY DEPTNO

  4. SELECT DEPTNO, COUNT() FROM EMP WHERE JOB=’CLERK’ GROUP BY DEPTNO

  5. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

This is the correct query for the desired result.