DB2 - Display number of employees in each department, if the department contains more than 5 employees

 Posted by Bandi on 11/30/2013 | Category: Others Interview questions | Views: 3335 | Points: 40
Answer:

SELECT DEPARTMENT_ID,COUNT(*) AS “NUMBER OF EMPLOYEES”
FROM EMPLOYEES
GROUP BY DEPARTMENT_ID
HAVING COUNT(*)>5


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response