DB2 - Display the average salaries of each DEPARTMENT_ID, include only the DEPARTMENT_ID s having more than $8000 of average salary.

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

SELECT department_id, AVG(SALARY)
FROM EMPLOYEES
GROUP BY DEPARTMENT_ID
HAVING AVG(salary) > 8000


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response